package com.brilliance.isc.vo.model;

import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.brilliance.isc.vo.collection.Docgrdm;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

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

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class BrtpVo extends AbstractCommonVo {

    //Panel Status  E-nable, D-isable, I-nvisible
    private String pansta = NULLSTR;

    //Register to Send and Settle Document
    private String setnowflg = NULLSTR;

    //Register to Handle Discrepancies
    private String dcrflg = NULLSTR;

    //MT752: Further Indentification
    private String furide = NULLSTR;

    //Create 752
    private String cre752flg = NULLSTR;

    //Create MT 732
    private String cre732flg = NULLSTR;

    //Contract Number
    private String connum = NULLSTR;

    //Maxamt from Brdgrp at the start of transaction
    private BigDecimal oldbrdmaxamt = Decimals.ZERO_SCALE3;

    //Additional open Amount fom Brdgrp at the start of transaction
    private BigDecimal oldbrdopnamt2 = Decimals.ZERO_SCALE3;

    //Flag to default Discrepancies
    private String docdisdefflg = NULLSTR;

    //start date
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date stadat;

    //是否需要核验
    private String ischktyp = NULLSTR;

    //预计核验日期
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date prechkdat;

    //Country or Region Code
    private String countrycode = NULLSTR;

    //MANBAB
    private String manbab = NULLSTR;

    private Docgrdm docgrdm;

    @Override
    public void reset() {
        super.reset();
        if (docgrdm == null) {
            docgrdm = new Docgrdm();
        }
        docgrdm.reset();
    }
}
