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:glp:GLP - Pool of GL Entries (3. Grid)
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Glp {

        //Internal Unique ID of GLP
        private String inr = NULLSTR;

        //Contract Type
        private String objtyp = NULLSTR;

        //INR of Contract
        private String objinr = NULLSTR;

        //Modified
        private String modflg = NULLSTR;

        //INR of Associated Temporary Settlement
        private String sepinr = NULLSTR;

        //Transaction Creating or Modifying the Entry
        private String srctrninr = NULLSTR;

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

        //Role
        private String rol = NULLSTR;

        //Account Currency
        private String acccur = NULLSTR;

        //Amount to be Paid
        private  BigDecimal fmtaccamt  = Decimals.ZERO_SCALE2;

        //Account
        private String act = NULLSTR;

        //Old Account
        private String oldact = NULLSTR;

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

        //Debit/Credit
        private String debcdtflg = NULLSTR;

        //Currency
        private String cur = NULLSTR;

        //Original Amount
        private  BigDecimal fmtamt  = Decimals.ZERO_SCALE2;

        //Acc. Amount Calculated from Sum
        private String accamtfix = NULLSTR;

        //Amount
        private  BigDecimal amt  = Decimals.ZERO_SCALE2;

        //Amount Booked
        private  BigDecimal accamt  = Decimals.ZERO_SCALE2;

        //Search Type
        private String actpriflg = NULLSTR;

        //Old Search Type
        private String oldactpriflg = NULLSTR;

        //Store as Standard Account for this Contract Party
        private String rolstdflg = NULLSTR;

        //Payment Order
        private String paoflg = NULLSTR;

        //Debit/Payment Information
        private String strinf52 = NULLSTR;

        //Usage of Forward Rate Checked
        private String fchchkflg = NULLSTR;

        //Their Account Identif.
        private String coractid = NULLSTR;

        //Role Address INR
        private String rolptainr = NULLSTR;

        //Role Party INR
        private String rolptyinr = NULLSTR;

        //Empty if not Changed by User
        private String actptyflg = NULLSTR;

        //Type of Main Payment Message
        private String sftmt = NULLSTR;

        //Advice Beneficiary by Telecommunication
        private String tlebenflg = NULLSTR;

        //Sender to Receiver Information Message to Benf. Inst.
        private String strinf = NULLSTR;

        //Sender to Receiver Information Message to Benf. Inst.
        private String strinferi = NULLSTR;

        //Code Selection
        private String strinfcon1 = NULLSTR;

        //Direct Payment One Message
        private String dirindflg = NULLSTR;

        //Disposition Flag
        private String dspflg = NULLSTR;

        //Acc. Currency for which Rate is Defined
        private String acccurold = NULLSTR;

        //Document Cur to Base RATe TYPe
        private String dcbrattyp = NULLSTR;

        //Document Cur to Base EXTernal RATe
        private  BigDecimal dcbextrat  = Decimals.ZERO_SCALE6;

        //Old Document Cur to Base EXTernal RATe
        private  BigDecimal olddcbextrat  = Decimals.ZERO_SCALE6;

        //Settle Cur to Base EXTernal RATe
        private  BigDecimal scbextrat  = Decimals.ZERO_SCALE6;

        //Old Settle Cur to Base EXTernal RATe
        private  BigDecimal oldscbextrat  = Decimals.ZERO_SCALE6;

        //Settle Cur to Base RATe TYPe
        private String scbrattyp = NULLSTR;

        //Type
        private String flg = NULLSTR;

        //Currency of Converted Amount Usually SYSCUR, Optional
        private String xrfcur = NULLSTR;

        //Sys Currency Amount Equivalent
        private  BigDecimal xrfamt  = Decimals.ZERO_SCALE2;

        //Forward Contract to be Used for Conversion
        private String fcdinr = NULLSTR;

        //Codetable of Supported Rate Types  M-iddle, B-uying, S-elling, I-nput
        private String rattyp = NULLSTR;

        //Settle Cur to Base SQaRing RATe
        private  BigDecimal scbsqrrat  = Decimals.ZERO_SCALE6;

        //Settle Cur to Base SQaRing RATe
        private  BigDecimal dcbsqrrat  = Decimals.ZERO_SCALE6;

        //Account Identif. Intermediary
        private String intactid = NULLSTR;

        //Rate Used
        private  BigDecimal rat  = Decimals.ZERO_SCALE6;

        //Account Identif. Available with Bank
        private String rolactid = NULLSTR;

        //Reference Document Rate Selling
        private  BigDecimal dcbresrat  = Decimals.ZERO_SCALE6;

        //Reference Document Rate Selling
        private  BigDecimal dcbrebrat  = Decimals.ZERO_SCALE6;

        //Reference Settle Rate Selling
        private  BigDecimal scbrebrat  = Decimals.ZERO_SCALE6;

        //Reference Settle Rate Selling
        private  BigDecimal scbresrat  = Decimals.ZERO_SCALE6;

        //Rate Base Currency
        private String bascur = NULLSTR;

        //Rate Base Currency Amount Equivalent
        private  BigDecimal basamt  = Decimals.ZERO_SCALE2;

        //Account Flag: Empty:Iinitialized M-anually D-efaulted N-o account found
        private String actflg = NULLSTR;

        //Account External Set
        private String extsetflg = NULLSTR;

        //Account Identif. Available with Bank
        private String awiactid = NULLSTR;

        //Done
        private String donflg = NULLSTR;

        //Ref. for SETxxx
        private  int setxxxrow ;

        //Value Date as Set from Transaction
        @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
        private Date valdattrn = NULLDATE;

        //Old Disposition
        private String olddsp = NULLSTR;

        //Old Account Party
        private String oldactinr = NULLSTR;

        //Compressed Amount Paid from this Line
        private  BigDecimal acccpramt  = Decimals.ZERO_SCALE2;

        //Compressed Amount Paid from this Line for Display
        private  BigDecimal fmtacccpramt  = Decimals.ZERO_SCALE2;

        //Disposition
        private String dsp = NULLSTR;

}