package com.brilliance.isc.vo.model;

import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.isc.common.json.BigDecimalSerialize;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

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
@JsonIgnoreProperties(ignoreUnknown = true)
public class BpdVo extends AbstractCommonVo {

    //Internal Unique ID of BP Contract
    private String inr = NULLSTR;

    //Our Reference
    private String ownref = NULLSTR;

    //Externally Displayed Name to Identify the Contract
    private String nam = NULLSTR;

    //Finance Name
    private String fianam = NULLSTR;

    //Name of Parent Contract
    private String pntnam = NULLSTR;

    //Finance Reference
    private String fiaref = NULLSTR;

    //Parent Reference
    private String pntref = NULLSTR;

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

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

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

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

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

    //Responsible User
    private String ownusr = NULLSTR;

    //Version Counter
    private String ver = NULLSTR;

    //Parent Contract INR
    private String pntinr = NULLSTR;

    //INR of forfaiting contract used
    private String fpdinr = NULLSTR;

    //Parent Contract Type
    private String pnttyp = NULLSTR;

    //Margin Spread applied to Interest Rate
    private BigDecimal intrat = Decimals.ZERO_SCALE6;

    //Interest Days
    private long intday;

    //Tenor Advanced
    private String liaextid = NULLSTR;

    //Type of Financing
    private String fintyp = NULLSTR;

    //Percentage
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal pctfin = Decimals.ZERO_SCALE2;

    //Rate Definition
    private String intirt = NULLSTR;

    //基准利率规则
    private String jzllgz = NULLSTR;

    //预扣息方式
    private String inttyp = NULLSTR;

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

    //预扣息账号
    private String intact = NULLSTR;

    //Entity holding Contract
    private String etyextkey = NULLSTR;

    //Punish Interest Rate
    private BigDecimal punintrat = Decimals.ZERO_SCALE6;

    //Total Rate of the Unfunded Risk Participation
    @JsonFormat(pattern = "#0.000000", shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal tolrat = Decimals.ZERO_SCALE6;

    //Marginal Rate
    private BigDecimal marrat = Decimals.ZERO_SCALE6;

    //Grace rate
    private BigDecimal grarat = Decimals.ZERO_SCALE6;

    //BRANCHINR
    private String branchinr = NULLSTR;

    //BRANCH KEY
    private String bchkeyinr = NULLSTR;

    //Risk Rate
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal rskrat = Decimals.ZERO_SCALE2;

    //Finance Risk Type
    private String rsktyp = NULLSTR;

    //Finance Account
    private String finact = NULLSTR;

    //Forfaiting Type
    private String fortyp = NULLSTR;

    //L/C Type
    private String lctyp = NULLSTR;

    //借据号
    private String fincod = NULLSTR;

    //Finance Data Block
    private String finblk = NULLSTR;

    //Interface Data Block
    private String itfblk = NULLSTR;

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

    //Overdue Flag
    private String ovdflg = NULLSTR;

    //收支标志
    private String feetyp = NULLSTR;

    //收入/槹用总额
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal feeamt = Decimals.ZERO_SCALE3;

    //实际利率
    private BigDecimal actyld = Decimals.ZERO_SCALE6;

    //Mortgage Flag
    private String guaflg = NULLSTR;

    //定价审批代码
    private String dinjdm = NULLSTR;

    //是否附有银行承兑汇票
    private String f0102 = NULLSTR;

    //境外付款人所属国家/地区
    private String f0103 = NULLSTR;

    //境外付款人所属部门
    private String f0104 = NULLSTR;

    //境外付款人与本机构的关系
    private String f0105 = NULLSTR;

    //交易性槨
    private String trntyp = NULLSTR;

    //对方槦号
    private String oppacc = NULLSTR;

    //是否定向收付
    private String flowflag = NULLSTR;

    //收款帐号
    private String recaccount = NULLSTR;

    //收款人名称
    private String recname = NULLSTR;

    //收款人国别代码
    private String reccountrycode = NULLSTR;

    //收款人国内地区码
    private String recdistrictcode = NULLSTR;

    //税率
    private BigDecimal shuilv = Decimals.ZERO_SCALE4;

    //参考指标
    private BigDecimal conrat = Decimals.ZERO_SCALE6;

    //发票类型
    private String invtyp = NULLSTR;

    //福槹廷转卖类型
    private String ffttyp = NULLSTR;

    //包买行SWIFT号
    private String bmhswf = NULLSTR;

    //包买行英文名称
    private String bmhenm = NULLSTR;

    //卖出日期
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date mcdate = NULLDATE;

    //包买行融资期限
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date bmhrzd = NULLDATE;

    //包买行汇入我行款项金额
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal bmhamt = Decimals.ZERO_SCALE3;

    //我行卖出执行利率
    private BigDecimal bmhrat = Decimals.ZERO_SCALE6;

    //业务槦号
    private String ywacct = NULLSTR;

    //市场LPR期限品种
    private String lprtyp = NULLSTR;

    //国内证受益人中文名称
    private String bennam = NULLSTR;

    //原一级市场买入融资借据号
    private String loanno = NULLSTR;

    //国内信用证受益人统一信用代码
    private String benidcode = NULLSTR;

    //槸易合同号
    private String mycontno = NULLSTR;

    //基础槸易是/否跨境槧物槸易
    private String iscrotra = NULLSTR;

    //国内证申请人名称
    private String aplnam = NULLSTR;

    //国内信用证申请人统一信用代码
    private String aplidcode = NULLSTR;

    //第几手融资
    private int finnum;

    //付款人
    private String fkr = NULLSTR;

    //付款槦号
    private String fkzh = NULLSTR;

    //起息日
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date qxr = NULLDATE;

    //付款行行号
    private String fkhnum = NULLSTR;

    //付款行行名
    private String fkhnam = NULLSTR;

    //收款人
    private String skr = NULLSTR;

    //收款槦号
    private String skzh = NULLSTR;

    //收款行行名
    private String skhnam = NULLSTR;

    //收款行行号
    private String skhnum = NULLSTR;

    //备注
    private String setrmk = NULLSTR;

    //中文槧物描述
    private String goddspcn = NULLSTR;

    //发票号
    private String invref = NULLSTR;

    //槭槧方名称
    private String purchasername = NULLSTR;

    //开证行Swift Code
    private String issbkbic = NULLSTR;

    //开证行名称
    private String issbkname = NULLSTR;

    //销槧方名称
    private String sellername = NULLSTR;

    //是否信保融资
    private String cifflg = NULLSTR;

    //贷款入账账号
    private String creditact = NULLSTR;

    //贷款入账户名
    private String creditusr = NULLSTR;

    //入账账号所属行名称
    private String creditbchnam = NULLSTR;

    //放款方式
    private String fkfs = NULLSTR;

    //还款类型
    private String opttyp = NULLSTR;

    //包买商账号
    private String baomzh = NULLSTR;

    //包买商账户名
    private String baomhm = NULLSTR;

    //包买商摘要
    private String baomzy = NULLSTR;
}
