package com.brilliance.isc.common.vo;

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 java.util.HashSet;
import java.util.Set;

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

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

    protected BigDecimal engamt = Decimals.ZERO_SCALE2;

    protected BigDecimal maxamt = Decimals.ZERO_SCALE2;

    protected BigDecimal ameamt = Decimals.ZERO_SCALE2;

    protected String amecur = "";

    protected String ameflg = NULLSTR;

    protected BigDecimal newamt = Decimals.ZERO_SCALE2;

    protected String newcur = "";

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

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

    protected String newexpflg = "";

    //修改集合
    protected Set<String> modifySet;

    //修改次数
    protected int amenbr;



    @Override
    public void reset() {
        if (engamt == null) {
            engamt = Decimals.ZERO_SCALE2;
        }
        if (maxamt == null) {
            maxamt = Decimals.ZERO_SCALE2;
        }
        if (ameamt == null) {
            ameamt = Decimals.ZERO_SCALE2;
        }
        if (newamt == null) {
            newamt = Decimals.ZERO_SCALE2;
        }
        if (modifySet == null) {
            modifySet = new HashSet<>();
        }
    }
}
