package com.mortals.xhx.module.workman.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.workman.model.vo.WorkmanVo;
import lombok.Data;
/**
 * 工作人员实体对象
 *
 * @author zxfei
 * @date 2023-09-21
 */
@Data
public class WorkmanEntity extends WorkmanVo {
    private static final long serialVersionUID = 1L;

    /**
     * 所属房间id
     */
    private Long roomId;
    /**
     * 所属房间名称
     */
    private String roomName;
    /**
     * 所属部门
     */
    private String deptName;
    /**
     * 姓名
     */
    private String name;
    /**
     * 性别(0.男,1.女)
     */
    private Integer sex;
    /**
     * 职务
     */
    private String userPost;
    /**
     * 电话
     */
    private String phone;
    /**
     * 手机
     */
    private String mobile;
    /**
     * 简介
     */
    private String summary;
    /**
     * 照片
     */
    private String photoPath;
    /**
     * 工作状态，来源基础设置
     */
    private String workStatus;
    /**
     * 登录用户名
     */
    private String loginName;
    /**
     * 密码
     */
    private String loginPwd;
    /**
     * 文件名称
     */
    @Excel(name = "文件名称")
    private String fileName;
    /**
     * 文件相对路径地址
     */
    @Excel(name = "文件相对路径地址")
    private String filePath;
    /**
     * 排序，值越大越靠前
     */
    private Integer order;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof WorkmanEntity) {
            WorkmanEntity tmp = (WorkmanEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.roomId = null;
        this.roomName = "";
        this.deptName = "";
        this.name = "";
        this.sex = 0;
        this.userPost = "";
        this.phone = "";
        this.mobile = "";
        this.summary = "";
        this.photoPath = "";
        this.workStatus = "";
        this.loginName = "";
        this.loginPwd = "";
        this.fileName = "";
        this.filePath = "";
        this.order = 1;
    }
}