package org.jeecg.modules.basedata.model;

import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import org.jeecg.modules.basedata.entity.BaseCustomerIndustry;

import java.util.List;

/**
 * 功能描述:客商行业
 *
 * @Author: chenchuang
 * @Date: 2021/11/11 18:58
 */
public class BaseCustomerIndustryTree {
    @ApiModelProperty("id")
    private String id;
    @ApiModelProperty("key")
    private String key;
    @ApiModelProperty("title")
    private String title;
    @ApiModelProperty("父节点id")
    private String parentId;
    @ApiModelProperty("行业编码")
    private String code;
    @ApiModelProperty("行业名称")
    private String name;
    @ApiModelProperty("状态(0:未启用, 1:启用)")
    private Integer status;
    @ApiModelProperty("子节点数据")
    private List<BaseCustomerIndustryTree> children;
    @ApiModelProperty(" 是否叶子节点: 1:是 0:不是")
    private boolean isLeaf;

    private Integer sort;

    private static final long serialVersionUID = 1L;

    public BaseCustomerIndustryTree() {
    }

    public BaseCustomerIndustryTree(BaseCustomerIndustry baseCustomerIndustry) {
        this.id = baseCustomerIndustry.getId();
        this.key = baseCustomerIndustry.getId();
        this.title = baseCustomerIndustry.getName();
        this.parentId = baseCustomerIndustry.getParentId();
        this.code = baseCustomerIndustry.getCode();
        this.status = baseCustomerIndustry.getStatus();
        this.sort=baseCustomerIndustry.getSort();
        this.isLeaf = false;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public List<BaseCustomerIndustryTree> getChildren() {
        return children;
    }

    public void setChildren(List<BaseCustomerIndustryTree> children) {
        if (children==null){
            this.isLeaf=true;
        }
        this.children = children;
    }

    public boolean getIsLeaf() {
        return isLeaf;
    }

    public void setIsLeaf(boolean leaf) {
        isLeaf = leaf;
    }
}