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-12-04
*/
@Data
public class WorkmanEntity extends WorkmanVo {
    private static final long serialVersionUID = 1L;

    /**
    * 姓名
    */
    private String name;
    /**
    * 性别(0.男,1.女)
    */
    private Integer sex;
    /**
    * 职务
    */
    private String userPost;
    /**
    * 电话
    */
    private String phone;
    /**
    * 手机
    */
    private String mobile;
    /**
    * 备注
    */
    private String summary;
    /**
    * 照片
    */
    private String photoPath;
    /**
    * 排序，值越大越靠前
    */
    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.name = "";
            this.sex = 0;
            this.userPost = "";
            this.phone = "";
            this.mobile = "";
            this.summary = "";
            this.photoPath = "";
            this.order = 1;
    }
}