package com.brilliance.isc.vo.finance;

import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.isc.common.json.BigDecimalSerialize;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.vo.model.FinmodBizInfoVo;
import com.brilliance.isc.vo.model.FinmodVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

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

/**
 * 融资摘要信息
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class TrdBizInfoVo extends BizInfoVo {
    //预扣息方式
    private  String inttyp = NULLSTR;

    //预收息金额
    @JsonSerialize(using = BigDecimalSerialize.class)
    private  BigDecimal intamt = Decimals.ZERO_SCALE3;

    //入?'?机构
    private  String accbch = NULLSTR;

    private  String actflg = NULLSTR;

    private  String clsflg = NULLSTR;  //闭卷

    private  String wipflg = NULLSTR;  //抹账

    private  String setact = NULLSTR;

    private  String calflg = NULLSTR;

    private String sndmsg = NULLSTR;  //Send message

    //Narrative
    private String strinf = NULLSTR;

    //代付金额
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal dftamt = Decimals.ZERO_SCALE2;

    //Type of Financing
    private String fintyp = NULLSTR;

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

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

    //闭卷日期
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date clsdat = NULLDATE;

    //Our Reference
    private String ownref = NULLSTR;


    private String doccur =  NULLSTR;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal docamt = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal cbeintamt1 = Decimals.ZERO_SCALE2;

    private String fincbscalflg;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fintotint = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fincbeamt = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fincbeintamt = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fincbeintamt1 = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fincbeintamt2 = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fincbeintamty1 = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fincbeintamty2 = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fincbbamt = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fincbbintamt = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fincbbintamt1 = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fincbbintamt2 = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fincbbintamty1 = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal fincbbintamty2 = Decimals.ZERO_SCALE2;

    //Parent Contract Reference
    private String pntref = NULLSTR;

    private String pnttyp = NULLSTR;

    //fremsg相关
    private String sndmt;
    private  String msgrol = NULLSTR;
    private  String ccrol = NULLSTR;
    private PtsptaVo othmsg;
    private PtsptaVo othcc;
    private  String reldir = NULLSTR;
    private  String fulmt = NULLSTR;
    private  String relmt = NULLSTR;
    //报送使用  执行利率  TRDGRP.REC.ACTRAT
    private BigDecimal cfarat = Decimals.ZERO_SCALE6;

    //报送使用  还本付息金额  FINMOD.CBS.TOTINT
    private BigDecimal totint = Decimals.ZERO_SCALE2;

    //报送使用  还本金额  FINMOD.CBS.CBE.AMT
    private BigDecimal finbckamt = Decimals.ZERO_SCALE2;

    //报送使用 借据号 FINMOD.FINCOD
    private String fincod =  NULLSTR;

    private String reptyp =  NULLSTR;

    private BigDecimal setamt = Decimals.ZERO_SCALE2;

    //发票类型
    private String invtyp;

    private String guaflg;

    private String ffaflg;

    private String ffaacc;
}
