package com.brilliance.isc.bo.lc;

import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.isc.bo.model.Aammod;
import com.brilliance.isc.bo.model.Ledgrp;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.common.trnmod.vo.SwiaddVo;
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 LetamepBo extends BaseTransactionVo {
    private static Logger log = LoggerFactory.getLogger(LetamepBo.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 Lcramep lcrdocamep;

    private Lcramep spcbenamep;

    private Lcramep spcrcbamep;

    private Lcramep lcrgodamep;

    private Lcramep adlcndamep;


    @Override
    public void reset() {

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


}