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

import com.brilliance.isc.common.rmbbop.common.IRecgrp;
import com.brilliance.isc.common.rmbbop.entity.Tdn;
import com.brilliance.isc.common.rmbbop.entity.Tej;
import com.brilliance.isc.common.rmbbop.entity.Tek;
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 Tdngrp extends AbstractCommonVo implements IRecgrp {
    private Tdn ads;
    private List<Tej> tej;
    private List<Tek> tek;

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