package com.brilliance.isc.common.liaone.vo;

import com.brilliance.mda.runtime.mda.Constants;
import com.brilliance.isc.bo.Act;
import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.bo.Cbe;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;

@Data
public class AcpliaVo extends AbstractCommonVo implements Serializable {

    @ApiModelProperty(value = "", name = "pansta", required = true)
    private String pansta = NULLSTR;

    private  String liagrdinr = NULLSTR;
    //INR of party for account defaulting
    private  String liaptyinr = NULLSTR;
    //Prefix of entry type default LIA; xxxAMT is booked, xxxSUM is read from CBS
    private  String cbtpfx = NULLSTR;
    //Don't book counter account
    private  String nobookcat = NULLSTR;
    //Ext ID in text
    private  String extidtxt = NULLSTR;
    //Object-Module-Path
    private  String objmod = NULLSTR;
    //Business sector
    private String bussec = NULLSTR;
    //Disposition for ACC default LIAACT
    private  String accdsp = NULLSTR;
    //INR of party for for defaulting of counter account
    private  String liaacc2ptyinr = NULLSTR;
    //INR of party for for account defaulting
    private  String liaaccptyinr = NULLSTR;
    //suffix to name if any
    private  String namsfx = NULLSTR;
    //
    private  String liaactterm1 = NULLSTR;
    //
    private  String liaactterm2 = NULLSTR;
    //new datafield
    private  String liatyp = NULLSTR;

    private Set<String> accSet;

    private Set<String> acc2Set;

    private Cbe cbe = null;

    private Cbe wrkcbe = null;

    private Cbb wrkcbb = null;

    private Act actrec = null;

    @Override
    public void reset() {
        if (cbe == null) {
            cbe = new Cbe();
        }
        if (wrkcbe == null) {
            wrkcbe = new Cbe();
        }
        if (wrkcbb == null) {
            wrkcbb = new Cbb();
        }
        if (actrec == null) {
            actrec = new Act();
        }
        this.setPansta(Constants.PanStaDelete);
        //this.setCbtpfx("LIA");
        this.setAccdsp("LIAACT");
        this.setLiatyp("AC");
        if (accSet == null) {
            accSet = new HashSet<>();
        }
        if (acc2Set == null) {
            acc2Set = new HashSet<>();
        }
    }
}
