package com.brilliance.isc.bo.model;

import com.brilliance.mda.runtime.mda.IStream;
import com.brilliance.mda.runtime.mda.impl.StreamImpl;
import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.brilliance.isc.common.vo.PtsptaVo;
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 Bdtp 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 BDDGRP at the start of transaction
    private BigDecimal oldbrdmaxamt = Decimals.ZERO_SCALE3;

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

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

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

    //最迟装运/服务提供日
    private  String zchday = NULLSTR;

    //装船日\\服务提供日
    private  String zcday = NULLSTR;

    private  String tag72add = NULLSTR;

    //来报发票信息流
    private IStream invdatstm = new StreamImpl();

    private PtsptaVo oth;

    private Docgrdm docgrdm;

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