package com.brilliance.isc.bo.model;

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

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

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

    private Fin rec;

    private Ine ine;

    private Cus cus;

    private Fsa fsa;

    private List<Ine> inelst;

    private List<Cus> cuslst;

//    private PtyVo pty;

//    private PtaVo pta;

    private Fsa oldfsa;

    private Fin oldfin;

    @Override
    public void reset() {
        if (rec == null) {
            rec = new Fin();
        }
        if (ine == null) {
            ine = new Ine();
        }
        if (cus == null) {
            cus = new Cus();
        }
        if (fsa == null) {
            fsa = new Fsa();
        }
        if (inelst == null) {
            inelst = new ArrayList<>();
        }
        if (cuslst == null) {
            cuslst = new ArrayList<>();
        }
        /*if (pty == null) {
            pty = new PtyVo();
        }
        pty.reset();
        if (pta == null) {
            pta = new PtaVo();
        }
        pta.reset();*/
        if (oldfsa == null) {
            oldfsa = new Fsa();
        }
        if (oldfin == null) {
            oldfin = new Fin();
        }
    }
}
