package com.mortals.xhx.module.dept.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.dept.model.vo.DeptVo;
/**
 * 部门信息实体对象
 *
 * @author zxfei
 * @date 2023-04-11
 */

public class DeptEntity extends DeptVo {
    private static final long serialVersionUID = 1L;

    /**
     * 父id
     */
    private Long parentId;
    /**
     * 祖级列表
     */
    @Excel(name = "祖级列表")
    private String ancestors;
    /**
     * 部门名称
     */
    @Excel(name = "部门名称")
    private String deptName;
    /**
     * 部门编码
     */
    @Excel(name = "部门编码")
    private String deptCode;
    /**
     * 部门状态(0.停用,1.启用)
     */
    private Integer deptStatus;
    /**
     * 顺序
     */
    private Integer orderNum;
    /**
     * 部门人数
     */
    private Integer personNum;
    /**
     * 负责人id
     */
    private Long workId;
    /**
     * 负责人名称
     */
    private String workName;
    /**
     * 备注
     */
    private String remark;



    public DeptEntity(){}
    /**
     * 获取 父id
     * @return Long
     */
    public Long getParentId(){
        return parentId;
    }
    /**
     * 设置 父id
     * @param parentId
     */
    public void setParentId(Long parentId){
        this.parentId = parentId;
    }
    /**
     * 获取 祖级列表
     * @return String
     */
    public String getAncestors(){
        return ancestors;
    }
    /**
     * 设置 祖级列表
     * @param ancestors
     */
    public void setAncestors(String ancestors){
        this.ancestors = ancestors;
    }
    /**
     * 获取 部门名称
     * @return String
     */
    public String getDeptName(){
        return deptName;
    }
    /**
     * 设置 部门名称
     * @param deptName
     */
    public void setDeptName(String deptName){
        this.deptName = deptName;
    }
    /**
     * 获取 部门编码
     * @return String
     */
    public String getDeptCode(){
        return deptCode;
    }
    /**
     * 设置 部门编码
     * @param deptCode
     */
    public void setDeptCode(String deptCode){
        this.deptCode = deptCode;
    }
    /**
     * 获取 部门状态(0.停用,1.启用)
     * @return Integer
     */
    public Integer getDeptStatus(){
        return deptStatus;
    }
    /**
     * 设置 部门状态(0.停用,1.启用)
     * @param deptStatus
     */
    public void setDeptStatus(Integer deptStatus){
        this.deptStatus = deptStatus;
    }
    /**
     * 获取 顺序
     * @return Integer
     */
    public Integer getOrderNum(){
        return orderNum;
    }
    /**
     * 设置 顺序
     * @param orderNum
     */
    public void setOrderNum(Integer orderNum){
        this.orderNum = orderNum;
    }
    /**
     * 获取 部门人数
     * @return Integer
     */
    public Integer getPersonNum(){
        return personNum;
    }
    /**
     * 设置 部门人数
     * @param personNum
     */
    public void setPersonNum(Integer personNum){
        this.personNum = personNum;
    }
    /**
     * 获取 负责人id
     * @return Long
     */
    public Long getWorkId(){
        return workId;
    }
    /**
     * 设置 负责人id
     * @param workId
     */
    public void setWorkId(Long workId){
        this.workId = workId;
    }
    /**
     * 获取 负责人名称
     * @return String
     */
    public String getWorkName(){
        return workName;
    }
    /**
     * 设置 负责人名称
     * @param workName
     */
    public void setWorkName(String workName){
        this.workName = workName;
    }
    /**
     * 获取 备注
     * @return String
     */
    public String getRemark(){
        return remark;
    }
    /**
     * 设置 备注
     * @param remark
     */
    public void setRemark(String remark){
        this.remark = remark;
    }




    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof DeptEntity) {
            DeptEntity tmp = (DeptEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",parentId:").append(getParentId());
        sb.append(",ancestors:").append(getAncestors());
        sb.append(",deptName:").append(getDeptName());
        sb.append(",deptCode:").append(getDeptCode());
        sb.append(",deptStatus:").append(getDeptStatus());
        sb.append(",orderNum:").append(getOrderNum());
        sb.append(",personNum:").append(getPersonNum());
        sb.append(",workId:").append(getWorkId());
        sb.append(",workName:").append(getWorkName());
        sb.append(",remark:").append(getRemark());
        return sb.toString();
    }

    public void initAttrValue(){

        this.parentId = 0L;

        this.ancestors = "";

        this.deptName = "";

        this.deptCode = "";

        this.deptStatus = 1;

        this.orderNum = 0;

        this.personNum = 0;

        this.workId = null;

        this.workName = "";

        this.remark = "";
    }
}