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.common.vo.PtsptaVo;
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 JsdgrpVo extends AbstractCommonVo {
    //PartyType of Applicant
    private  String apltypflg = NULLSTR;
    //use of temporary addresses for APL
    private  String apltmpflg = NULLSTR;
    //是否择期
    private  String benzbz = NULLSTR;
    //择期起始日期
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date qishrq;
    //交割日
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private  Date qixiri;
    //保证金�'�号
    private  String bzhjzh = NULLSTR;
    //业务类型
    private  String chlibz1 = NULLSTR;
    //违约金付款帐号
    private  String dkrzzh = NULLSTR;
    //择期改期起始日期
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private  Date chkrqi;
    //总行返还客户收益入�'��'�号
    private  String bwqxzh = NULLSTR;
    //到期日
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date daoqrq;
    //总行返还收益币种
    private  String huo2dh = NULLSTR;
    //违约金付款币种
    private  String sxfbzh = NULLSTR;
    //交割方式
    private  String yewulx = NULLSTR;
    //部分交割买入金额
    private BigDecimal bujxje = Decimals.ZERO_SCALE3;
    //部分交割卖出金额
    private BigDecimal cbdlje = Decimals.ZERO_SCALE3;
    //显示远端
    private  String shwfar = NULLSTR;
    
    //适用业务类型
    private String appbt = NULLSTR;

    //数据是否从前手交易带入
    private String prvflg = NULLSTR;

    private JsdVo rec;
    private JstVo blk;
    private DtaretVo dtaret;
    private HuidanVo huidan;
    private JsacbsVo cbs;
    private PtsptaVo apl;
    private PtsptaVo age;

    @Override
    public void reset() {
        if (rec == null) {
            rec = new JsdVo();
        }
        if (blk == null) {
            blk = new JstVo();
        }
        if (dtaret == null) {
            dtaret = new DtaretVo();
        }
        if (huidan == null) {
            huidan = new HuidanVo();
        }
        if (cbs == null) {
            cbs = new JsacbsVo();
        }
        cbs.reset();
        if (apl == null) {
            apl = new PtsptaVo();
        }
        apl.reset();
        if (age == null) {
            age = new PtsptaVo();
        }
        age.reset();
    }
}
