package com.brilliance.isc.bo;

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.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 Gcd extends AbstractCommonVo {
    //Internal Unique ID of Guarantee

    private String inr = NULLSTR;

    //Reference

    private String ownref = NULLSTR;

    //Internal Unique ID of Parent Guarantee

    private String pntinr = NULLSTR;

    //Type of Guarantee Contract GID

    private String pnttyp = NULLSTR;

    //Externally Displayed Name to Identify the Contract

    private String nam = NULLSTR;

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

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

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

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

    //Responsible User

    private String ownusr = NULLSTR;

    //Version Counter

    private String ver = NULLSTR;

    //Type of Claim

    private String clmtyp = NULLSTR;

    //Type of Claim/Order

    private String clmctl = NULLSTR;

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

    //Payment under Cancelation of Guarantee

    private String cannowflg = NULLSTR;

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

    //Payer

    private String payrol = NULLSTR;

    //Presented by

    private String docprbrol = NULLSTR;

    //Demand Statement

    private String demstat = NULLSTR;

    //Reinstatement Days
    private  int dipreiday ;

    //Reinstatement Principle Amount
    private String dipreiflg1 = NULLSTR;

    //Reinstatement Interest Amount

    private String dipreiflg3 = NULLSTR;

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

    //Total Amount to be Paid
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal totamt  = Decimals.ZERO_SCALE2;

    //Currency of Total Amount to be Paid

    private String totcur = NULLSTR;

    //Entity holding Contract

    private String etyextkey = NULLSTR;

    //free of payment flag

    private String frepayflg = NULLSTR;

    //BRANCH CODE KEYINR

    private String bchkeyinr = NULLSTR;

    //BRANCHINR

    private String branchinr = NULLSTR;

    //预计核验日期

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

    //是否需要核验

    private String ischktyp = NULLSTR;

    //修改后担保到期日
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date Expludat  = NULLDATE;


}
