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-03-06
*/

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;
    /**
    * 部门状态(0.停用,1.启用)
    */
    private Integer deptStatus;
    /**
    * 顺序
    */
    private Integer orderNum;
    /**
    * 备注
    */
    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;
    }
    /**
    * 获取 部门状态(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 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(",deptStatus:").append(getDeptStatus());
        sb.append(",orderNum:").append(getOrderNum());
        sb.append(",remark:").append(getRemark());
        return sb.toString();
    }

    public void initAttrValue(){

            this.parentId = null;

            this.ancestors = "";

            this.deptName = "";

            this.deptStatus = 1;

            this.orderNum = 0;

            this.remark = "";
    }
}