package com.brilliance.isc.vo.lg;

import com.brilliance.mda.runtime.mda.IStream;
import com.brilliance.mda.runtime.mda.impl.StreamImpl;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.common.trnmod.vo.SwiaddVo;
import com.brilliance.isc.vo.model.Nidgrp;
import com.brilliance.isc.vo.model.Nitp;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import java.math.BigDecimal;

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

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class HitdlaStoreVo extends BaseTransactionVo {
    private Nidgrp nidgrp;
    private Nidgrp oldnidgrp;
    private Nitp nitp;
    private SwiaddVo swiadd;
    private int amenbr;
    private String ameflg = NULLSTR;
    private String amecur = NULLSTR;
    private String amedat = NULLSTR;
    private BigDecimal ameamt = new BigDecimal("0.00");
    private IStream decstm = new StreamImpl();

    @Override
    public void reset() {
        super.reset();
        if (nidgrp == null) {
            nidgrp = new Nidgrp();
        }
        nidgrp.reset();
        if (oldnidgrp == null) {
            oldnidgrp = new Nidgrp();
        }
        oldnidgrp.reset();
        if (nitp == null) {
            nitp = new Nitp();
        }
        if (swiadd == null) {
            swiadd = new SwiaddVo();
        }
        swiadd.reset();
    }
}

