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

import com.brilliance.isc.common.rmbbop.common.IRecgrp;
import com.brilliance.isc.common.rmbbop.entity.Tbk;
import com.brilliance.isc.common.rmbbop.entity.Tdb;
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 Tdbgrp extends AbstractCommonVo implements IRecgrp {
    private Tdb ads;

    private List<Tbk> tbk;

    @Override
    public void reset() {
        super.reset();
        if (ads == null) {
            ads = new Tdb();
        }
        if (tbk == null) {
            tbk = new ArrayList<>();
        }
        ads.reset();
    }
}
