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.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;


/**
* TABLE:lid:LID - Import L/C Data
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Lid extends AbstractCommonVo {

        //Internal Unique ID of Import L/C
        private String inr = NULLSTR;

        //Reference
        private String ownref = NULLSTR;

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

        //Responsible User
        private String ownusr = NULLSTR;

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

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

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

        //Advising Bank
        private String advnam = NULLSTR;

        //Advising Bank Reference
        private String advref = NULLSTR;

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

        //Number of Amendment
        private  int amenbr ;

        //Applicant Address
        private String aplnam = NULLSTR;

        //Applicant Reference
        private String aplref = NULLSTR;

        //Available by
        private String avbby = NULLSTR;

        //Available with
        private String avbwth = NULLSTR;

        //Beneficiary
        private String bennam = NULLSTR;

        //Beneficiary Reference
        private String benref = NULLSTR;

        //Own Charges Borne by
        private String chato = NULLSTR;

        //Confirmation Instructions
        private String cnfdet = NULLSTR;

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

        //Place of Expiry
        private String expplc = NULLSTR;

        //Form of Documentary Credit
        private String lcrtyp = NULLSTR;

        //Amount Specification
        private String nomspc = NULLSTR;

        //Amount Tolerance - Positive
        private  int nomtop ;

        //Amount Tolerance - Negative
        private  int nomton ;

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

        //Reimbursing Bank Account Identification
        private String rmbact = NULLSTR;

        //Reimbursing Bank's Charges
        private String rmbcha = NULLSTR;

        //Reimbursement Information
        private String rmbflg = NULLSTR;

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

        //Shipment from
        private String shpfro = NULLSTR;

        //Port of Loading
        private String porloa = NULLSTR;

        //Port of Discharge
        private String pordis = NULLSTR;

        //Partial Shipment
        private String shppar = NULLSTR;

        //For Transportation to
        private String shpto = NULLSTR;

        //Transshipment
        private String shptrs = NULLSTR;

        //Country Code Risk Country
        private String stacty = NULLSTR;

        //Goods Code
        private String stagod = NULLSTR;

        //Count of Received Document Sets
        private  int utlnbr ;

        //Count of Advised Sub-Contracts without Documents
        private  int advnbr ;

        //Red/Green Clause
        private String redclsflg = NULLSTR;

        //Version Counter
        private String ver = NULLSTR;

        //Internal Type of L/C Default: Normal L/C; B: Back to Back
        private String lcityp = NULLSTR;

        //INR of LE Backing this L/C
        private String b2binr = NULLSTR;

        //Reference of Contract Backing this L/C
        private String b2bref = NULLSTR;

        //Number of Revolvings under L/C
        private  int revnbr ;

        //Revolving Times
        private  int revtimes ;

        //Revolving Flag
        private String revflg = NULLSTR;

        //Awaiting Applicant's Request
        private String revawapl = NULLSTR;

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

        //Credit is Marked as Cumulative
        private String revcum = NULLSTR;

        //Revolving Type
        private String revtyp = NULLSTR;

        //Applicant's Bank
        private String initpty = NULLSTR;

        //Reserved Contract
        private String resflg = NULLSTR;

        //Applicable Rules
        private String apprul = NULLSTR;

        //Applicable Rules Reimbursement
        private String apprulrmb = NULLSTR;

        //Other Applicable Rules
        private String apprultxt = NULLSTR;

        //Draft Number
        private  int dftnbr ;

        //Date of Authorisation to Reimburse
        @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
        private Date autdat = NULLDATE;

        //Special Payment Conditions for specified Bank only
        private String spcrcbflg = NULLSTR;

        //Special payment conditions for beneficiary exists
        private String spcbenflg = NULLSTR;

        //Partial Shipment for Swift release 2018
        private String shppars18 = NULLSTR;

        //Transshipment for Swift relase 2018
        private String shptrss18 = NULLSTR;

        //Days of presentation period
        private  int prepers18 ;

        //Presentation period text
        private String prepertxts18 = NULLSTR;

        //Entity holding Contract
        private String etyextkey = NULLSTR;

        //Maximum tenor in days
        private  int tenmaxday ;

        //BRANCHINR
        private String branchinr = NULLSTR;

        //BRANCH CODE KEYINR
        private String bchkeyinr = NULLSTR;

        //存在减额修改标志
        private String decflg = NULLSTR;

        //Cash cover percent
        private  BigDecimal cshpct  = Decimals.ZERO_SCALE2;

        //Mortgage Flag
        private String guaflg = NULLSTR;

        //国内信用证标志
        private String dflg = NULLSTR;

        //运输方式
        private String tratyp = NULLSTR;

        //Register Ref.
        private String regref = NULLSTR;

        //合同号
        private String rptref = NULLSTR;

        //发票号
        private String invref = NULLSTR;

        //Delete sum
        private  int delnbr ;

        //假远期信用证标志
        private String jyqflg = NULLSTR;

        //对手行代码
        private String oppbnk = NULLSTR;

        //槸易类型
        private String mytype = NULLSTR;

        //分期时镧表
        private String fqtime = NULLSTR;

        //输入运输方式
        private String sdsrfs = NULLSTR;

        //是否议付
        private String fenctg = NULLSTR;

        //是否代开信用证
        private String dkflg = NULLSTR;

        //交易对手名称
        private String oppnam = NULLSTR;

        //被代理客户
        private String proextkey = NULLSTR;

        //国家和地区名称代码EAST
        private String countrycod = NULLSTR;

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

        //OPN需客户确认
        private String needcuscomopn = NULLSTR;

        //AME需客户确认
        private String needcuscomame = NULLSTR;

        private String oldref;

        /**
         * 合同金额币种
         */
        private String rptcur;

        /**
         * 合同金额
         */
        @JsonSerialize(using = BigDecimalSerialize.class)
        private BigDecimal rptamt = Decimals.ZERO_SCALE2;
}