package com.brilliance.isc.vo.lg;

import com.brilliance.mda.runtime.mda.IStream;
import com.brilliance.mda.runtime.mda.impl.StreamImpl;
import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.isc.common.json.BigDecimalSerialize;
import com.brilliance.isc.common.trnmod.vo.SwiaddVo;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.vo.model.Nidgrp;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.math.BigDecimal;
import java.util.Date;

import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class NitamepVo extends AbstractCommonVo {

    //Currency of Maximum Amount
    private String maxcur = NULLSTR;

    //New Maximum Amount
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal maxamt = Decimals.ZERO_SCALE2;

    //Engagement Currency
    private String engcur = NULLSTR;

    //change of engagement
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal engamt = Decimals.ZERO_SCALE2;

    private String cre767flg;

    private String clsclmflg;

    private String prtflg;

    private String ametxt;

    private String ametxtc;

    private String rejbut;

    private int amenbr;

    private String ramrol = "";


    private String purposame = "";

    private String ameaccflg = "";


    //text 'unlimited' / new expiry
    private String expnewtxt;
    private String newliatxt;

    //Default content of Amendment :77C:
    private String ametxtdef;
    //Amendment :77C: modified
    private String ametxtflg;
    //Flag for begin of Amendment
    private String iniameflg;
    //recreate full guarantee
    private String redflg;
    //agreement of bene. required
    private String abrflg;
    //Auto Narrative
    private String autnar;
    //Modify Narrative ?
    private String modnarflg;
    //Create Autoregistration for
    private String crereg;
    //text 'unlimited'
    private String limnottxt;
    //text 'unlimited' / new liability
    private String limnewtxt;
    //text 'unlimited' / old expiry
    private String expnottxt;
    //Order From
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date orddat;

    //Label for RAMROL
    private String ramrollab;


    //Status E-nable, D-isable, I-nvisible
    private String pansta;

    //Balance
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal oldopc1amt = Decimals.ZERO_SCALE2;
    //Balance
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal oldmacamt = Decimals.ZERO_SCALE2;
    //Currency
    private String oldopc1cur;
    //Tag F3 in  Message DTA G4
    private String tagf3txt;
    //Currency
    private String oldmaccur;
    //old content of purposame
    private String oldpurposame;
    //Flag for SPT
    private String sptflg;
    //reject flg
    private String rejflg;
    //reject stream
    private IStream rejstm = new StreamImpl();
    //number of amendment
    private int nbr;
    //amendment amount
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal ameamt = Decimals.ZERO_SCALE2;
    //date of amendment
    private String amedat;
    //cur
    private String amecur;

    //plateflg
    private String plateflg;
    //面函标题
    private String mstitle;
    //银关保函操作
    private String amemsg;
    //变�'次数
    private String amenumjmg;
    //GCDOWNREF
    private String ncdownref;
    //Amendment :77C: modified
    private String ametxtflgc;
    //显示文本
    private Nidgrp nidgrp;

    private Nidgrp oldnidgrp;

//		private Nidget recget;

    private SwiaddVo swiadd;

//    private Aammod aammod;

//		@Module(getter = false, setter = false)
//		private transient ModuleHolder<Aammod> aammod;

//		private Txbbut amebut;
//
//		private Txbbut amebutc;

    private PtsptaVo iss;

//		@TDGetter
//		private YptgimodVo yptgimod;


    @Override
    public void reset() {
        if (swiadd == null) {
            swiadd = new SwiaddVo();
        }
    }


}
