package com.brilliance.isc.vo.model;

import com.brilliance.mda.runtime.mda.util.Decimals;
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 static com.brilliance.mda.runtime.mda.Constants.NULLSTR;

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

    //Calculate Flag
    private  String calflg = NULLSTR;
    //Total Interest
    @JsonSerialize(using = BigDecimalSerialize.class)
    private BigDecimal totint = Decimals.ZERO_SCALE3;

    private FinamtVo cbb;

    private FinamtVo cbe;

    @Override
    public void reset() {
        if (cbb == null) {
            cbb = new FinamtVo();
        }
        if (cbe == null) {
            cbe = new FinamtVo();
        }
    }
}
