package com.brilliance.isc.bo.model;

import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.bo.Cbe;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

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


/**
 * Transaction support functions for additional amount
 */

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

    //Additional Amount covered
    private  String addamtflg = NULLSTR;

    //Add. Amount
    private String addamtcov = NULLSTR;

    private Cbb max;

    private Cbb opn1;

    private Cbb max2;

    private Cbb opn2;

    private Cbe wrkcbe;

    private Cbb wrkcbb;

    @Override
    public void reset() {

        if(max == null){
            max = new Cbb();
        }
        max.reset();

        if(opn1 == null){
            opn1 = new Cbb();
        }
        opn1.reset();

        if(opn2 == null){
            opn2 = new Cbb();
        }
        opn2.reset();

        if(wrkcbe == null){
            wrkcbe = new Cbe();
        }

        if(wrkcbb == null){
            wrkcbb = new Cbb();
        }
        wrkcbb.reset();

    }

}
