package im.zksy.yjmqserver.system.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.util.List;

public class Dept implements Serializable {

    private static final long serialVersionUID = -194076170058276436L;

    /**
 	* 部门ID
	*/
    @JsonProperty("value")
    private String deptId;

    /**
	* 部门名称
	*/
    @JsonProperty("text")
    private String deptName;

    /**
	* 上级部门 ID
	*/
    @JsonIgnore
    private Integer parentId;

    /**
	* 排序
	*/
    @JsonIgnore
    private Integer orderNum;

    /**
	* 创建时间
	*/
    @JsonIgnore
    private String createTime;

    /**
	* 修改时间
	*/
    @JsonIgnore
    private String modifyTime;
    @JsonIgnore
    private  String level;

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Dept> nodes;

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public Integer getParentId() {
        return parentId;
    }

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

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(String modifyTime) {
        this.modifyTime = modifyTime;
    }

//    public List<Dept> getChildren() {
//        return children;
//    }
//
//    public void setChildren(List<Dept> children) {
//        this.children = children;
//    }

    public List<Dept> getNodes() {
        return nodes;
    }

    public void setNodes(List<Dept> nodes) {
        this.nodes = nodes;
    }

    @Override
    public String toString() {
        return "Dept{" +
                "deptId=" + deptId +
                ", deptName='" + deptName + '\'' +
                ", parentId=" + parentId +
                ", orderNum=" + orderNum +
                ", createTime=" + createTime +
                ", modifyTime=" + modifyTime +
                ", nodes=" + nodes +
                '}';
    }
}