package com.brilliance.isc.vo.lc;

import com.brilliance.isc.common.json.BigDecimalSerialize;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.common.vo.PtsptaVo;
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;

/**
 * 进口信用证业务要素
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class LidBizInfoVo extends BizInfoVo {

    //支取类型 dnfmod.zhqtyp
    private String zhqtyp;

    /**
     * 创建707报文标识 litamep.cre707flg
     */
    private String cre707flg;

    /**
     * 是否接受修改标识 litdla.ameflg
     */
    private String ameflg;

    /**
     * 减少金额 litdla.reduceamt
     */
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal reduceamt;

    /**
     * Reimbursement Information, litdgrp.rec.rmbflg
     */
    private String rmbflg;

    /**
     * Send message to apllicant, litcan.sndmsg
     */
    private String sndmsg;

    //国内信用证标志 LIDGRP\REC\Dflg
    private String dflg = NULLSTR;

    /**
     * GRP\REC\NOMTOP Amount Tolerance - Positive
     */
    private int nomtop;

    /**
     * GRP\REC\OPNDAT //Date L/C Opened/Issued
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date opndat = NULLDATE;

    /**
     * GRP\REC\CREDAT Date of Creation Opening or Registry
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date credat = NULLDATE;

    /**
     * GRP\REC\STTTENDAT
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date stttendat = NULLDATE;

    /**
     * GRP\REC\MATDAT
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date matdat = NULLDATE;

    /**
     * GRP\REC\EXPDAT//Date of Expiry
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date expdat = NULLDATE;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date newexpdat;

    //是否代开信用证 LIDGRP\REC\DKFLG
    private String dkflg = NULLSTR;

    //Reference LIDGRP\REC\ownref
    private String ownref = NULLSTR;

    //fremsg相关
    private String sndmt;
    private String msgrol = NULLSTR;
    private String ccrol = NULLSTR;
    private PtsptaVo othmsg;
    private PtsptaVo othcc;
    private String reldir = NULLSTR;
    private String fulmt = NULLSTR;
    private String relmt = NULLSTR;
    private int tenmaxday = -1;
    // LIDGRP\\REC\\STACTY
    private String stacty;

    // 统一名单使用
    private String porloa;

    private String pordis;

    private String shpfro;

    private String shpto;

    // 表外即期/远期使用
    private String avbby;

    private String guaflg;
}
