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:ord:ORD - Order
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Ord {

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

        //External Readable Identification
        private String nam = NULLSTR;

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

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

        //INR of Associated Incoming Message
        private String smhinr = NULLSTR;

        //INR of Ordering Party
        private String ptainr = NULLSTR;

        //External Key
        private String extkey = NULLSTR;

        //Infoflag
        private String infdsp = NULLSTR;

        //Infotext
        private String inftxt = NULLSTR;

        //Status
        private String sta = NULLSTR;

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

        //Responsible Group Optional
        private String ownusg = NULLSTR;

        //Responsible User Optional
        private String ownusr = NULLSTR;

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

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

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

        //Duration in Seconds
        private  BigDecimal totdur  = Decimals.ZERO_SCALE2;

        //Predefined Priority Class
        private String slacla = NULLSTR;

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

        //Entity owning Order
        private String etyextkey = NULLSTR;

        //Order OK
        private String chkflg = NULLSTR;

        //收单行处理标志
        private String sdhflg = NULLSTR;

        //
        private String bchkeyinr = NULLSTR;

        //
        private String branchinr = NULLSTR;

        //ETGEXTKEY
        private String etgextkey = NULLSTR;

        //境内外币标志
        private String fmtflg = NULLSTR;

        //分行业务上送至总行时间
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
        private Date reltim ;
}