package com.brilliance.isc.bo;

import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.isc.common.json.BigDecimalSerialize;
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:spt:SPT - System Pending Transaction
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Spt {

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

        //Table Used to Store Object
        private String objtyp = NULLSTR;

        //INR of Object
        private String objinr = NULLSTR;

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

        //Reference
        private String objref = NULLSTR;

        private String channel = NULLSTR;

        //User Readable Source of the Pending Entry
        private String txt = NULLSTR;

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

        //Creating User ID
        private String usr = NULLSTR;

        //INR of Creating Session
        private String ssninr = NULLSTR;

        //Transaction Used to Reload/Process
        private String frm = NULLSTR;

        //电商汇款或海运费标记
        private String ehtyp = NULLSTR;

        //Panel to be Restored when Picking Up
        private String pan = NULLSTR;

        //Status
        private String sta = NULLSTR;

        //Item is deleted
        private String delflg = NULLSTR;

        //Hold Flag
        private String hldflg = NULLSTR;

        //Info Flag
        private String infdsp = NULLSTR;

        //Infotext
        private String inftxt = NULLSTR;

        //Responsible Group Optional
        private String ownusg = NULLSTR;

        //Responsible User Optional
        private String ownusr = NULLSTR;

        //INR of Message Optional
        private String smhinr = NULLSTR;

        //Mapping Flag
        private String mapflg = NULLSTR;

        //Creating Transaction ID
        private String cretrn = NULLSTR;

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

        //Target Time for Completion
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
        private Date tardattim = NULLDATE;

        //Object Type of Creating Object
        private String creobjtyp = NULLSTR;

        //INR of Creating Object
        private String creobjinr = NULLSTR;

        //Relevant Currency Optional
        private String relcur = NULLSTR;

        //Relevant Amount Optional
        @JsonSerialize(using = BigDecimalSerialize.class)
        private  BigDecimal relamt  = Decimals.ZERO_SCALE2;

        //Entity Group of Pending Entry
        private String etgextkey = NULLSTR;

        //Entity of Pending Entry
        private String etyextkey = NULLSTR;

        //ID OF PTA
        private String ptainr = NULLSTR;

        //是否付款业务（通过报文类型判断）
        private String payflg = NULLSTR;

        //WORK GROUP
        private String wrkgrp = NULLSTR;

        //WORK USER
        private String wrkusr = NULLSTR;

        //BCHKEY INR
        private String bchkeyinr = NULLSTR;

        //BRANCHINR
        private String branchinr = NULLSTR;

        //VIPFLG
        private String vipflg = NULLSTR;

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

        //SWIFT TYPE
        private String msgtyp = NULLSTR;

        //Flg of 202 cp or other
        private String flg202 = NULLSTR;

        //Ref.
        private String ownref = NULLSTR;

        //Image inr
        private String imginr = NULLSTR;

        //LAST USER
        private String lstusr = NULLSTR;

        //LAST GROUP
        private String lstgrp = NULLSTR;

        //Payment type
        private String paytyp = NULLSTR;

        //电商来报状态标记
        private String eciflg = NULLSTR;

        //电证对方参考号
        private String dfref = NULLSTR;

        //客户名称-为了来报使用
        private String ctmnam = NULLSTR;

        //渠道业务编号
        private String chnref = NULLSTR;

        private String cortyp= NULLSTR;

        private String frontchannel= NULLSTR;
}