package com.brilliance.isc.vo.lc;

import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.isc.bo.model.Aammod;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.common.trnmod.vo.SwiaddVo;
import com.brilliance.isc.vo.model.Ledgrp;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

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

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

/**
 * Frames for import L/Cs
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@Getter
@Setter
public class LetamepVo extends BaseTransactionVo {
    private static Logger log = LoggerFactory.getLogger(LetamepVo.class);

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

    //Narrative
    private String nartxt = NULLSTR;

    //Request of Amendment send to
    private String ramrol = NULLSTR;

    //Label for RAMROL
    private String ramrollab = NULLSTR;

    //Narrative
    private String tag79txt707 = NULLSTR;

    //Beneficiary's Confirmation Required
    private String benconflg = NULLSTR;

    //Flag for SPT
    private String sptflg = NULLSTR;

    //Create Amendment Message-Flag
    private String cre707flg = NULLSTR;

    //Amendment Accepted by Beneficiary
    private String benaccflg = NULLSTR;

    //Amendment date
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date amedat;

    //Number of Amendment
    private int amenbr;

    //Narrative :79:
    private String ametxt = NULLSTR;

    //New Maximum Amount
    private BigDecimal maxamt = Decimals.ZERO_SCALE3;

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

    //change of engagement:
    private BigDecimal engamt = Decimals.ZERO_SCALE3;

    //Engagement Currency
    private String engcur = NULLSTR;

    //Default of Narrative
    private String nartxtdef = NULLSTR;

    private LcramepVo lcrdocamep;

    private LcramepVo spcbenamep;

    private LcramepVo spcrcbamep;

    private LcramepVo lcrgodamep;

    private LcramepVo adlcndamep;

    @Override
    public void reset() {

        if (lcrdocamep == null) {
            lcrdocamep = new LcramepVo();
        }
        if (spcbenamep == null) {
            spcbenamep = new LcramepVo();
        }
        if (spcrcbamep == null) {
            spcrcbamep = new LcramepVo();
        }
        if (lcrgodamep == null) {
            lcrgodamep = new LcramepVo();
        }
        if (adlcndamep == null) {
            adlcndamep = new LcramepVo();
        }
    }
}