package com.hssx.pcbms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author 吴涛涛
 * @since 2019-11-05
 */
public class User extends Model<User> {

    private static final long serialVersionUID=1L;

    /**
     * 用户表主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 头像
     */
    @TableField("head_url")
    private String headUrl;

    /**
     * 姓名
     */
    @TableField("name")
    private String name;

    /**
     * 手机号
     */
    @TableField("phone")
    private String phone;

    /**
     * 部门id
     */
    @TableField("dept_id")
    private String deptId;

    /**
     * 审核是否通过 0-未通过 1-通过
     */
    @TableField("is_pass")
    private Integer isPass;

    /**
     * 创建时间
     */
    @TableField("indate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime indate;

    /**
     * 同步过来的密码 没有作用
     */
    @TableField("password")
    private String password;

    /**
     * 角色名称
     */
    @TableField("role_name")
    private String roleName;

    /**
     * 邮箱
     */
    @TableField("email")
    private String email;

    /**
     * 性别 1:男 2:女
     */
    @TableField("sex")
    private Integer sex;

    /**
     * 生日
     */
    @TableField("birthday")
    private String birthday;

    /**
     * 联系电话
     */
    @TableField("office_phone")
    private String officePhone;

    /**
     * 职级
     */
    @TableField("job_title")
    private String jobTitle;

    /**
     * 登录名
     */
    @TableField("login_name")
    private String loginName;

    /**
     * 登录系统所需要的密码
     */
    @TableField("login_password")
    private String loginPassword;

    /**
     * 工作性质：0：正式 1：临时
     */
    @TableField("xing_zhi")
    private Integer xingZhi;

    /**
     * 用户 KEY 编号
     */
    @TableField("key_code")
    private String keyCode;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getHeadUrl() {
        return headUrl;
    }

    public void setHeadUrl(String headUrl) {
        this.headUrl = headUrl;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public Integer getIsPass() {
        return isPass;
    }

    public void setIsPass(Integer isPass) {
        this.isPass = isPass;
    }

    public LocalDateTime getIndate() {
        return indate;
    }

    public void setIndate(LocalDateTime indate) {
        this.indate = indate;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getOfficePhone() {
        return officePhone;
    }

    public void setOfficePhone(String officePhone) {
        this.officePhone = officePhone;
    }

    public String getJobTitle() {
        return jobTitle;
    }

    public void setJobTitle(String jobTitle) {
        this.jobTitle = jobTitle;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getLoginPassword() {
        return loginPassword;
    }

    public void setLoginPassword(String loginPassword) {
        this.loginPassword = loginPassword;
    }

    public Integer getXingZhi() {
        return xingZhi;
    }

    public void setXingZhi(Integer xingZhi) {
        this.xingZhi = xingZhi;
    }

    public String getKeyCode() {
        return keyCode;
    }

    public void setKeyCode(String keyCode) {
        this.keyCode = keyCode;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "User{" +
        "id=" + id +
        ", headUrl=" + headUrl +
        ", name=" + name +
        ", phone=" + phone +
        ", deptId=" + deptId +
        ", isPass=" + isPass +
        ", indate=" + indate +
        ", password=" + password +
        ", roleName=" + roleName +
        ", email=" + email +
        ", sex=" + sex +
        ", birthday=" + birthday +
        ", officePhone=" + officePhone +
        ", jobTitle=" + jobTitle +
        ", loginName=" + loginName +
        ", loginPassword=" + loginPassword +
        ", xingZhi=" + xingZhi +
        ", keyCode=" + keyCode +
        "}";
    }
}
