package com.wisewoods.base.bean;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.entity.node.BaseExpandNode;
import com.chad.library.adapter.base.entity.node.BaseNode;

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

public class TreePeopleBean extends Results<List<TreePeopleBean.DataBean>> {

    public static class DataBean extends BaseExpandNode {

        public String deptName;
        public long deptId;
        public long userId;
        public List<DataBean> children;
        public List<BaseNode> childNode;
        public boolean isCheck;

        public DataBean() {
            setExpanded(false);
        }

        public boolean isLastLevel() {
            return userId > 0;
        }

        @Nullable
        @Override
        public List<BaseNode> getChildNode() {
            List<BaseNode> childNode = new ArrayList<BaseNode>(this.children);
            return childNode;
        }
    }


}
