package com.brilliance.isc.bo;

import com.brilliance.mda.runtime.mda.util.Decimals;
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.NULLDATE;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;


/**
* TABLE:trn:TRN - Transaction Record
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Trn {

        //Internal Unique ID of Transaction Control Record
        private String inr = NULLSTR;

        //Timestamp of Entry of Transaction
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
        private Date inidattim = NULLDATE;

        //Frame Used to Create the Transaction
        private String inifrm = NULLSTR;

        //User Creating the Transaction
        private String iniusr = NULLSTR;

        //Transaction Name of Storing Transaction
        private String ininam = NULLSTR;

        //Own Reference
        private String ownref = NULLSTR;

        //Object Type of Associated Contract Optional
        private String objtyp = NULLSTR;

        //Object INR of Associated Contract Optional
        private String objinr = NULLSTR;

        //External Readable Object Identification
        private String objnam = NULLSTR;

        //INR of SSN where transaction was created
        private String ssninr = NULLSTR;

        //Next Counter for SMH within TRN
        private  int smhnxt ;

        //Responsible Group
        private String usg = NULLSTR;

        //Responsible User
        private String usr = NULLSTR;

        //Timestamp of Completion Execution of Last Service
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
        private Date cpldattim = NULLDATE;

        //Infoflag
        private String infdsp = NULLSTR;

        //Infotext
        private String inftxt = NULLSTR;

        //Release Status
        private String relflg = NULLSTR;

        //Committed 'C' if Committed
        private String comflg = NULLSTR;

        //Date of Commit
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
        private Date comdat = NULLDATE;

        //INR of preceeding TRN
        private String cortrninr = NULLSTR;

        //Status of Recalculation
        private String xreflg = NULLSTR;

        //Currencies Handled by Transaction
        private String xrecurblk = NULLSTR;

        //Currency of Relevant Amount for Release
        private String relcur = NULLSTR;

        //Relevant Amount for Release
        private  BigDecimal relamt  = Decimals.ZERO_SCALE2;

        //Currency of Relevant Amount for Release in Original Currency
        private String reloricur = NULLSTR;

        //Relevant Amount for Release in Original Currency
        private  BigDecimal reloriamt  = Decimals.ZERO_SCALE2;

        //Required Signatures
        private String relreq = NULLSTR;

        //Applied Signatures
        private String relres = NULLSTR;

        //Flag, if External Confirmation Necessary
        private String cnfflg = NULLSTR;

        //Events
        private String evttxt = NULLSTR;

        //Sent for Repair to
        private String rprusr = NULLSTR;

        //INR of Triggering Order
        private String ordinr = NULLSTR;

        //Execution Date
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
        private Date exedat = NULLDATE;

        //Entity holding Transaction
        private String etyextkey = NULLSTR;

        //BRANCH KEY INR
        private String bchkeyinr = NULLSTR;

        //Account Branch INR
        private String accbchinr = NULLSTR;

        //RELEASE REQUIRE CENTER
        private String relreq0 = NULLSTR;

        //RELEASE REQUIRE BRANCH
        private String relreq1 = NULLSTR;

        //RELEASE REQUIRE SUB BRANCH
        private String relreq2 = NULLSTR;

        //RELEASE SERVER CENTER
        private String relres0 = NULLSTR;

        //RELEASE SERVER BRANCH
        private String relres1 = NULLSTR;

        //RELEASE SERVER SUB BRANCH
        private String relres2 = NULLSTR;

        //RELEASE USER1
        private String relusr1 = NULLSTR;

        //RELEASE USER2
        private String relusr2 = NULLSTR;

        //RELEASE USER3
        private String relusr3 = NULLSTR;

        //inr of image
        private String imginr = NULLSTR;

        //BRANCHINR
        private String branchinr = NULLSTR;

        //Organ flag
        private String orgflg = NULLSTR;

        //Addtional text
        private String addtxt = NULLSTR;

        //文件清理日期
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
        private Date clndat = NULLDATE;
}