package com.brilliance.isc.common.rmbbop.model;

import com.brilliance.isc.common.rmbbop.common.IRecgrp;
import com.brilliance.isc.common.rmbbop.entity.Tbz;
import com.brilliance.isc.common.rmbbop.entity.Tcr;
import com.brilliance.isc.common.rmbbop.entity.Tda;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

@Setter
@Getter
@JsonIgnoreProperties(ignoreUnknown = true)
public class Tcrgrp extends AbstractCommonVo implements IRecgrp {
    private Tcr ads;
    private Tda bas;
    private List<Tbz> tbz;

    @Override
    public void reset() {
        super.reset();
        if (ads == null) {
            ads = new Tcr();
        }
        ads.reset();
        if (bas == null) {
            bas = new Tda();
        }
        bas.reset();
        if (tbz == null) {
            tbz = new ArrayList<>();
        }
    }
}
