package com.mosty.common.core.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户信息表
 * @TableName sys_user
 */
@Data
@TableName(value ="mosty_base.sys_user")
public class SysUser implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "用户ID")
    private Long id;

    @TableField(value = "manager_org_id")
    @ApiModelProperty(value = "管理部门ID")
    private Long managerOrgId;

    @TableField(value = "manager_org_name")
    @ApiModelProperty(value = "管理部门名称")
    private String managerOrgName;

    @TableField(value = "position_id")
    @ApiModelProperty(value = "岗位ID")
    private Long positionId;

    @TableField(value = "position_name")
    @ApiModelProperty(value = "岗位名称")
    private String positionName;

    @TableField(value = "is_virtual_user")
    @ApiModelProperty(value = "是否虚拟用户：1、是 2、不是")
    private String isVirtualUser;

    @TableField(value = "login_name")
    @ApiModelProperty(value = "登录账号")
    private String loginName;

    @TableField(value = "password")
    @ApiModelProperty(value = "密码")
    private String password;

    @TableField(value = "user_name")
    @ApiModelProperty(value = "用户昵称")
    private String userName;

    @TableField(value = "user_type")
    @ApiModelProperty(value = "用户类型（00系统用户 01注册用户）")
    private String userType;

    @TableField(value = "email")
    @ApiModelProperty(value = "用户邮箱")
    private String email;

    @TableField(value = "mobile")
    @ApiModelProperty(value = "移动电话")
    private String mobile;

    @TableField(value = "tele_phone")
    @ApiModelProperty(value = "电话号码")
    private String telePhone;

    @TableField(value = "id_entity_card")
    @ApiModelProperty(value = "身份证号")
    private String idEntityCard;

    @TableField(value = "in_dust_rial_id")
    @ApiModelProperty(value = "行业号码（如：警号）")
    private String inDustRialId;

    @TableField(value = "sex")
    @ApiModelProperty(value = "用户性别（0男 1女 2未知）")
    private String sex;

    @TableField(value = "nation")
    @ApiModelProperty(value = "民族")
    private String nation;

    @TableField(value = "politic")
    @ApiModelProperty(value = "政治面貌")
    private String politic;

    @TableField(value = "marital")
    @ApiModelProperty(value = "婚姻状态")
    private String marital;

    @TableField(value = "type")
    @ApiModelProperty(value = "人员类别")
    private String type;

    @TableField(value = "type_name")
    @ApiModelProperty(value = "人员类别中文")
    private String typeName;

    @TableField(value = "whcd")
    @ApiModelProperty(value = "文化程度")
    private String whcd;

    @TableField(value = "bz")
    @ApiModelProperty(value = "备注")
    private String bz;

    @TableField(value = "birthday")
    @ApiModelProperty(value = "出生日期")
    private String birthday;

    @TableField(value = "begin_time")
    @ApiModelProperty(value = " 用户有效开始时间，默认为当前日期（用户可改）")
    private Date beginTime;

    @TableField(value = "end_time")
    @ApiModelProperty(value = " 用户有效结束时间，默认空")
    private Date endTime;

    @TableField(value = "salt")
    @ApiModelProperty(value = "盐加密")
    private String salt;

    @TableField(value = "xzcs")
    @ApiModelProperty(value = "选择次数")
    private Integer xzcs;

    @TableField(value = "xt_zxbz")
    private Integer xtZxbz;

    @TableField(value = "xt_zxyz")
    private String xtZxyz;

    @TableField(value = "xt_cjsj")
    private Date xtCjsj;

    @TableField(value = "xt_lrsj")
    private Date xtLrsj;

    @TableField(value = "xt_lrrxm")
    private String xtLrrxm;

    @TableField(value = "xt_lrrid")
    private Long xtLrrid;

    @TableField(value = "xt_lrrbm")
    private String xtLrrbm;

    @TableField(value = "xt_lrrbmid")
    private String xtLrrbmid;

    @TableField(value = "xt_lrip")
    private String xtLrip;

    @TableField(value = "xt_zhxgsj")
    private Date xtZhxgsj;

    @TableField(value = "xt_zhxgrxm")
    private String xtZhxgrxm;

    @TableField(value = "xt_zhxgid")
    private Long xtZhxgid;

    @TableField(value = "xt_zhxgrbm")
    private String xtZhxgrbm;

    @TableField(value = "xt_zhxgrbmid")
    private Long xtZhxgrbmid;

    @TableField(value = "xt_zhxgrip")
    private String xtZhxgrip;

    @TableField(value = "sfrh")
    private String sfrh;

    @TableField(value = "mk")
    private String mk;

    /** 用户头像 */
    @TableField(value = "avatar")
    @ApiModelProperty(value = "头像")
    private String avatar;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysUser other = (SysUser) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getManagerOrgId() == null ? other.getManagerOrgId() == null : this.getManagerOrgId().equals(other.getManagerOrgId()))
            && (this.getManagerOrgName() == null ? other.getManagerOrgName() == null : this.getManagerOrgName().equals(other.getManagerOrgName()))
            && (this.getPositionId() == null ? other.getPositionId() == null : this.getPositionId().equals(other.getPositionId()))
            && (this.getPositionName() == null ? other.getPositionName() == null : this.getPositionName().equals(other.getPositionName()))
            && (this.getLoginName() == null ? other.getLoginName() == null : this.getLoginName().equals(other.getLoginName()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getUserType() == null ? other.getUserType() == null : this.getUserType().equals(other.getUserType()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
            && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
            && (this.getTelePhone() == null ? other.getTelePhone() == null : this.getTelePhone().equals(other.getTelePhone()))
            && (this.getIdEntityCard() == null ? other.getIdEntityCard() == null : this.getIdEntityCard().equals(other.getIdEntityCard()))
            && (this.getInDustRialId() == null ? other.getInDustRialId() == null : this.getInDustRialId().equals(other.getInDustRialId()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getNation() == null ? other.getNation() == null : this.getNation().equals(other.getNation()))
            && (this.getWhcd() == null ? other.getWhcd() == null : this.getWhcd().equals(other.getWhcd()))
            && (this.getBz() == null ? other.getBz() == null : this.getBz().equals(other.getBz()))
            && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
            && (this.getBeginTime() == null ? other.getBeginTime() == null : this.getBeginTime().equals(other.getBeginTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getSalt() == null ? other.getSalt() == null : this.getSalt().equals(other.getSalt()))
            && (this.getXtZxbz() == null ? other.getXtZxbz() == null : this.getXtZxbz().equals(other.getXtZxbz()))
            && (this.getXtZxyz() == null ? other.getXtZxyz() == null : this.getXtZxyz().equals(other.getXtZxyz()))
            && (this.getXtCjsj() == null ? other.getXtCjsj() == null : this.getXtCjsj().equals(other.getXtCjsj()))
            && (this.getXtLrsj() == null ? other.getXtLrsj() == null : this.getXtLrsj().equals(other.getXtLrsj()))
            && (this.getXtLrrxm() == null ? other.getXtLrrxm() == null : this.getXtLrrxm().equals(other.getXtLrrxm()))
            && (this.getXtLrrid() == null ? other.getXtLrrid() == null : this.getXtLrrid().equals(other.getXtLrrid()))
            && (this.getXtLrrbm() == null ? other.getXtLrrbm() == null : this.getXtLrrbm().equals(other.getXtLrrbm()))
            && (this.getXtLrrbmid() == null ? other.getXtLrrbmid() == null : this.getXtLrrbmid().equals(other.getXtLrrbmid()))
            && (this.getXtLrip() == null ? other.getXtLrip() == null : this.getXtLrip().equals(other.getXtLrip()))
            && (this.getXtZhxgsj() == null ? other.getXtZhxgsj() == null : this.getXtZhxgsj().equals(other.getXtZhxgsj()))
            && (this.getXtZhxgrxm() == null ? other.getXtZhxgrxm() == null : this.getXtZhxgrxm().equals(other.getXtZhxgrxm()))
            && (this.getXtZhxgid() == null ? other.getXtZhxgid() == null : this.getXtZhxgid().equals(other.getXtZhxgid()))
            && (this.getXtZhxgrbm() == null ? other.getXtZhxgrbm() == null : this.getXtZhxgrbm().equals(other.getXtZhxgrbm()))
            && (this.getXtZhxgrbmid() == null ? other.getXtZhxgrbmid() == null : this.getXtZhxgrbmid().equals(other.getXtZhxgrbmid()))
            && (this.getXtZhxgrip() == null ? other.getXtZhxgrip() == null : this.getXtZhxgrip().equals(other.getXtZhxgrip()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getManagerOrgId() == null) ? 0 : getManagerOrgId().hashCode());
        result = prime * result + ((getManagerOrgName() == null) ? 0 : getManagerOrgName().hashCode());
        result = prime * result + ((getPositionId() == null) ? 0 : getPositionId().hashCode());
        result = prime * result + ((getPositionName() == null) ? 0 : getPositionName().hashCode());
        result = prime * result + ((getLoginName() == null) ? 0 : getLoginName().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getUserType() == null) ? 0 : getUserType().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
        result = prime * result + ((getTelePhone() == null) ? 0 : getTelePhone().hashCode());
        result = prime * result + ((getIdEntityCard() == null) ? 0 : getIdEntityCard().hashCode());
        result = prime * result + ((getInDustRialId() == null) ? 0 : getInDustRialId().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getNation() == null) ? 0 : getNation().hashCode());
        result = prime * result + ((getWhcd() == null) ? 0 : getWhcd().hashCode());
        result = prime * result + ((getBz() == null) ? 0 : getBz().hashCode());
        result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
        result = prime * result + ((getBeginTime() == null) ? 0 : getBeginTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getSalt() == null) ? 0 : getSalt().hashCode());
        result = prime * result + ((getXtZxbz() == null) ? 0 : getXtZxbz().hashCode());
        result = prime * result + ((getXtZxyz() == null) ? 0 : getXtZxyz().hashCode());
        result = prime * result + ((getXtCjsj() == null) ? 0 : getXtCjsj().hashCode());
        result = prime * result + ((getXtLrsj() == null) ? 0 : getXtLrsj().hashCode());
        result = prime * result + ((getXtLrrxm() == null) ? 0 : getXtLrrxm().hashCode());
        result = prime * result + ((getXtLrrid() == null) ? 0 : getXtLrrid().hashCode());
        result = prime * result + ((getXtLrrbm() == null) ? 0 : getXtLrrbm().hashCode());
        result = prime * result + ((getXtLrrbmid() == null) ? 0 : getXtLrrbmid().hashCode());
        result = prime * result + ((getXtLrip() == null) ? 0 : getXtLrip().hashCode());
        result = prime * result + ((getXtZhxgsj() == null) ? 0 : getXtZhxgsj().hashCode());
        result = prime * result + ((getXtZhxgrxm() == null) ? 0 : getXtZhxgrxm().hashCode());
        result = prime * result + ((getXtZhxgid() == null) ? 0 : getXtZhxgid().hashCode());
        result = prime * result + ((getXtZhxgrbm() == null) ? 0 : getXtZhxgrbm().hashCode());
        result = prime * result + ((getXtZhxgrbmid() == null) ? 0 : getXtZhxgrbmid().hashCode());
        result = prime * result + ((getXtZhxgrip() == null) ? 0 : getXtZhxgrip().hashCode());
        return result;
    }

    @Override
    public String toString() {
        return getClass().getSimpleName() +
                " [" +
                "Hash = " + hashCode() +
                ", id=" + id +
                ", managerOrgId=" + managerOrgId +
                ", managerOrgName=" + managerOrgName +
                ", positionId=" + positionId +
                ", positionName=" + positionName +
                ", loginName=" + loginName +
                ", password=" + password +
                ", userName=" + userName +
                ", userType=" + userType +
                ", email=" + email +
                ", mobile=" + mobile +
                ", telePhone=" + telePhone +
                ", idEntityCard=" + idEntityCard +
                ", inDustRialId=" + inDustRialId +
                ", sex=" + sex +
                ", nation=" + nation +
                ", whcd=" + whcd +
                ", bz=" + bz +
                ", birthday=" + birthday +
                ", beginTime=" + beginTime +
                ", endTime=" + endTime +
                ", salt=" + salt +
                ", xtZxbz=" + xtZxbz +
                ", xtZxyz=" + xtZxyz +
                ", xtCjsj=" + xtCjsj +
                ", xtLrsj=" + xtLrsj +
                ", xtLrrxm=" + xtLrrxm +
                ", xtLrrid=" + xtLrrid +
                ", xtLrrbm=" + xtLrrbm +
                ", xtLrrbmid=" + xtLrrbmid +
                ", xtLrip=" + xtLrip +
                ", xtZhxgsj=" + xtZhxgsj +
                ", xtZhxgrxm=" + xtZhxgrxm +
                ", xtZhxgid=" + xtZhxgid +
                ", xtZhxgrbm=" + xtZhxgrbm +
                ", xtZhxgrbmid=" + xtZhxgrbmid +
                ", xtZhxgrip=" + xtZhxgrip +
                ", serialVersionUID=" + serialVersionUID +
                "]";
    }
}