package com.mortals.xhx.module.job.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.mortals.xhx.module.job.model.vo.JobVo;
/**
 * 职位信息实体对象
 *
 * @author zxfei
 * @date 2023-04-11
 */

public class JobEntity extends JobVo {
    private static final long serialVersionUID = 1L;

    /**
     * 分组id
     */
    @JsonInclude(JsonInclude.Include.ALWAYS)
    private Long groupId;
    /**
     * 分组名称
     */
    @JsonInclude(JsonInclude.Include.ALWAYS)
    private String groupName;
    /**
     * 职位编码
     */
    private String jobCode;
    /**
     * 职位名称
     */
    private String jobName;
    /**
     * 备注
     */
    private String remark;
    /**
     * 节点类型(1.分组,2.职位)
     */
    private Integer type;



    public JobEntity(){}
    /**
     * 获取 分组id
     * @return Long
     */
    public Long getGroupId(){
        return groupId;
    }
    /**
     * 设置 分组id
     * @param groupId
     */
    public void setGroupId(Long groupId){
        this.groupId = groupId;
    }
    /**
     * 获取 分组名称
     * @return String
     */
    public String getGroupName(){
        return groupName;
    }
    /**
     * 设置 分组名称
     * @param groupName
     */
    public void setGroupName(String groupName){
        this.groupName = groupName;
    }
    /**
     * 获取 职位编码
     * @return String
     */
    public String getJobCode(){
        return jobCode;
    }
    /**
     * 设置 职位编码
     * @param jobCode
     */
    public void setJobCode(String jobCode){
        this.jobCode = jobCode;
    }
    /**
     * 获取 职位名称
     * @return String
     */
    public String getJobName(){
        return jobName;
    }
    /**
     * 设置 职位名称
     * @param jobName
     */
    public void setJobName(String jobName){
        this.jobName = jobName;
    }
    /**
     * 获取 备注
     * @return String
     */
    public String getRemark(){
        return remark;
    }
    /**
     * 设置 备注
     * @param remark
     */
    public void setRemark(String remark){
        this.remark = remark;
    }
    /**
     * 获取 节点类型(1.分组,2.职位)
     * @return Integer
     */
    public Integer getType(){
        return type;
    }
    /**
     * 设置 节点类型(1.分组,2.职位)
     * @param type
     */
    public void setType(Integer type){
        this.type = type;
    }




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

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",groupId:").append(getGroupId());
        sb.append(",groupName:").append(getGroupName());
        sb.append(",jobCode:").append(getJobCode());
        sb.append(",jobName:").append(getJobName());
        sb.append(",remark:").append(getRemark());
        sb.append(",type:").append(getType());
        return sb.toString();
    }

    public void initAttrValue(){

        this.groupId = 0L;

        this.groupName = "";

        this.jobCode = "";

        this.jobName = "";

        this.remark = "";

        this.type = 1;
    }
}