package com.junmp.jyzb.api.bean.dto;

import lombok.Data;

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

@Data
public class OrgDto {
    private Long orgId;
    private String orgName;
    private String orgCode;
    private Integer isDepartment;
    private Long orgParentId;
    private String orgParentIds;
    private String areaName;
    private Integer levelFlag;
    private String dName;
    private Boolean isLeaf;
    private Integer statusFlag;
    private Integer delFlag;
    private Integer childCount;
    private Date updateTime;
    private Integer isFlag;
    private String parentDName;
    private String findCode;
    private List<OrgDto> children;

    public void addChild(OrgDto child) {
        if (child != null) {
            if (this.children == null) {
                this.children = new ArrayList<>();
            }
            this.children.add(child);
        }
    }
}

