package com.brilliance.isc.bo.model;

import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.isc.bo.*;
import com.brilliance.isc.common.json.BigDecimalSerialize;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

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

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

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal bgdamt  = Decimals.ZERO_SCALE2;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal totamt  = Decimals.ZERO_SCALE2;

    private String buttyp  = NULLSTR;

    private String ratflg  = NULLSTR;

    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal sodrat  = Decimals.ZERO_SCALE6;

    private boolean isenableMdf;
    private boolean isenableApl;
    private boolean isenableAme;
    private boolean isenableChk;
    private boolean isenableKjc;
    private boolean isenableCxz;
    private boolean isenableBun;
    private boolean isenableUnb;
    private boolean isenableAba;
    private boolean isenableReg;
    private boolean isenableRcv;
    private boolean isenableRfu;
    private boolean isenableUnd;
    private boolean isenableDet;
    private boolean isenableRet;

    private List<Danlst> danlst;

    @Override
    public void reset() {
        super.reset();
        if (danlst == null) {
            danlst = new ArrayList<>();
        }
//        inelst.forEach(ine -> ine.reset());
    }
}
