package top.imwork.uaa.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

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

/**
 * 用户信息
 *
 * @author jiangxiaowei
 * email: e-jiangxiaowei@outlook.com
 * date: 2025-12-09 16:29:22
 */
@TableName("sys_user")
public class SysUser implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 用户id
     */
    @TableId
    private Long id;
    /**
     * 登录账号
     */
    private String loginName;
    /**
     * 登录密码
     */
    private String loginPassword;
    /**
     * 二次登录密码
     */
    private String secondLoginPassword;
    /**
     * 用户实名
     */
    private String userName;
    /**
     * 用户名拼音
     */
    private String userNamePinyin;
    /**
     * 用户姓名拼音缩写
     */
    private String userNameSpell;
    /**
     * 用户性别:0-男，1-女，2-保密
     */
    private String userGender;
    /**
     * 用户身份证
     */
    private String userIdCard;
    /**
     * 用户默认邮件地址
     */
    private String userEmail;
    /**
     * 用户默认手机号
     */
    private String userMobilPhone;
    /**
     * 用户默认地址
     */
    private String userAddress;
    /**
     * 用户详情
     */
    private String userDesc;
    /**
     * 用户类型 0为系统默认用户 ，1普通管理员，2为系统管理员,9超级管理员
     */
    private String userType;
    /**
     * 用户状态，默认为0，1代表无效，2是被锁定,3暂停使用
     */
    private String userStatus;
    /**
     * 用户头像 存储头像记录id
     */
    private String userAvatarId;
    /**
     * 用户昵称
     */
    private String userNickName;
    /**
     * 盐
     */
    private String salt;
    /**
     * 区分工号内外网.0.内网1.外网9.通用
     */
    private String dncnet;
    /**
     * 允许密码输入错误次数
     */
    private Integer allowedErrorTimes;
    /**
     * 登录错误次数
     */
    private Integer loginErrorTimes;
    /**
     * 是否支持单不同IP地址登录同一用户，0为不支持，1为支持
     */
    private String isDifferentIpLogin;
    /**
     * 最后登录时间
     */
    private Date lastLoginTime;
    /**
     * 启用0否1是
     */
    private Integer enabled;
    /**
     * 默认排序
     */
    private Long sort;
    /**
     * 系统层级状态的数学表述(默认0正常 1删除 2受限操作)
     */
    private Integer state;
    /**
     * 系统层级状态(默认0正常 1删除 2受限操作)
     */
    private String status;
    /**
     * 是否刪除(默认0 未删除 1已删除）
     */
    private String delFlag;
    /**
     * 创建人
     */
    private String creator;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 修改人
     */
    private String modifier;
    /**
     * 修改时间
     */
    private Date updateTime;
    /**
     * 备注
     */
    private String remark;

    @Override
    public String toString() {
        return "SysUser{" +
                "id=" + id +
                ", loginName='" + loginName + '\'' +
                ", loginPassword='" + loginPassword + '\'' +
                ", secondLoginPassword='" + secondLoginPassword + '\'' +
                ", userName='" + userName + '\'' +
                ", userNamePinyin='" + userNamePinyin + '\'' +
                ", userNameSpell='" + userNameSpell + '\'' +
                ", userGender='" + userGender + '\'' +
                ", userIdCard='" + userIdCard + '\'' +
                ", userEmail='" + userEmail + '\'' +
                ", userMobilPhone='" + userMobilPhone + '\'' +
                ", userAddress='" + userAddress + '\'' +
                ", userDesc='" + userDesc + '\'' +
                ", userType='" + userType + '\'' +
                ", userStatus='" + userStatus + '\'' +
                ", userAvatarId='" + userAvatarId + '\'' +
                ", userNickName='" + userNickName + '\'' +
                ", salt='" + salt + '\'' +
                ", dncnet='" + dncnet + '\'' +
                ", allowedErrorTimes=" + allowedErrorTimes +
                ", loginErrorTimes=" + loginErrorTimes +
                ", isDifferentIpLogin='" + isDifferentIpLogin + '\'' +
                ", lastLoginTime=" + lastLoginTime +
                ", enabled=" + enabled +
                ", sort=" + sort +
                ", state=" + state +
                ", status='" + status + '\'' +
                ", delFlag='" + delFlag + '\'' +
                ", creator='" + creator + '\'' +
                ", createTime=" + createTime +
                ", modifier='" + modifier + '\'' +
                ", updateTime=" + updateTime +
                ", remark='" + remark + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        SysUser sysUser = (SysUser) o;
        return Objects.equals(id, sysUser.id) && Objects.equals(loginName, sysUser.loginName) && Objects.equals(loginPassword, sysUser.loginPassword) && Objects.equals(secondLoginPassword, sysUser.secondLoginPassword) && Objects.equals(userName, sysUser.userName) && Objects.equals(userNamePinyin, sysUser.userNamePinyin) && Objects.equals(userNameSpell, sysUser.userNameSpell) && Objects.equals(userGender, sysUser.userGender) && Objects.equals(userIdCard, sysUser.userIdCard) && Objects.equals(userEmail, sysUser.userEmail) && Objects.equals(userMobilPhone, sysUser.userMobilPhone) && Objects.equals(userAddress, sysUser.userAddress) && Objects.equals(userDesc, sysUser.userDesc) && Objects.equals(userType, sysUser.userType) && Objects.equals(userStatus, sysUser.userStatus) && Objects.equals(userAvatarId, sysUser.userAvatarId) && Objects.equals(userNickName, sysUser.userNickName) && Objects.equals(salt, sysUser.salt) && Objects.equals(dncnet, sysUser.dncnet) && Objects.equals(allowedErrorTimes, sysUser.allowedErrorTimes) && Objects.equals(loginErrorTimes, sysUser.loginErrorTimes) && Objects.equals(isDifferentIpLogin, sysUser.isDifferentIpLogin) && Objects.equals(lastLoginTime, sysUser.lastLoginTime) && Objects.equals(enabled, sysUser.enabled) && Objects.equals(sort, sysUser.sort) && Objects.equals(state, sysUser.state) && Objects.equals(status, sysUser.status) && Objects.equals(delFlag, sysUser.delFlag) && Objects.equals(creator, sysUser.creator) && Objects.equals(createTime, sysUser.createTime) && Objects.equals(modifier, sysUser.modifier) && Objects.equals(updateTime, sysUser.updateTime) && Objects.equals(remark, sysUser.remark);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, loginName, loginPassword, secondLoginPassword, userName, userNamePinyin, userNameSpell, userGender, userIdCard, userEmail, userMobilPhone, userAddress, userDesc, userType, userStatus, userAvatarId, userNickName, salt, dncnet, allowedErrorTimes, loginErrorTimes, isDifferentIpLogin, lastLoginTime, enabled, sort, state, status, delFlag, creator, createTime, modifier, updateTime, remark);
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Long getId() {
        return id;
    }

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

    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 String getSecondLoginPassword() {
        return secondLoginPassword;
    }

    public void setSecondLoginPassword(String secondLoginPassword) {
        this.secondLoginPassword = secondLoginPassword;
    }

    public String getUserNamePinyin() {
        return userNamePinyin;
    }

    public void setUserNamePinyin(String userNamePinyin) {
        this.userNamePinyin = userNamePinyin;
    }

    public String getUserNameSpell() {
        return userNameSpell;
    }

    public void setUserNameSpell(String userNameSpell) {
        this.userNameSpell = userNameSpell;
    }

    public String getUserGender() {
        return userGender;
    }

    public void setUserGender(String userGender) {
        this.userGender = userGender;
    }

    public String getUserIdCard() {
        return userIdCard;
    }

    public void setUserIdCard(String userIdCard) {
        this.userIdCard = userIdCard;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getUserMobilPhone() {
        return userMobilPhone;
    }

    public void setUserMobilPhone(String userMobilPhone) {
        this.userMobilPhone = userMobilPhone;
    }

    public String getUserAddress() {
        return userAddress;
    }

    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress;
    }

    public String getUserDesc() {
        return userDesc;
    }

    public void setUserDesc(String userDesc) {
        this.userDesc = userDesc;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getUserStatus() {
        return userStatus;
    }

    public void setUserStatus(String userStatus) {
        this.userStatus = userStatus;
    }

    public String getUserAvatarId() {
        return userAvatarId;
    }

    public void setUserAvatarId(String userAvatarId) {
        this.userAvatarId = userAvatarId;
    }

    public String getUserNickName() {
        return userNickName;
    }

    public void setUserNickName(String userNickName) {
        this.userNickName = userNickName;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getDncnet() {
        return dncnet;
    }

    public void setDncnet(String dncnet) {
        this.dncnet = dncnet;
    }

    public Integer getAllowedErrorTimes() {
        return allowedErrorTimes;
    }

    public void setAllowedErrorTimes(Integer allowedErrorTimes) {
        this.allowedErrorTimes = allowedErrorTimes;
    }

    public Integer getLoginErrorTimes() {
        return loginErrorTimes;
    }

    public void setLoginErrorTimes(Integer loginErrorTimes) {
        this.loginErrorTimes = loginErrorTimes;
    }

    public String getIsDifferentIpLogin() {
        return isDifferentIpLogin;
    }

    public void setIsDifferentIpLogin(String isDifferentIpLogin) {
        this.isDifferentIpLogin = isDifferentIpLogin;
    }

    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    public Long getSort() {
        return sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getModifier() {
        return modifier;
    }

    public void setModifier(String modifier) {
        this.modifier = modifier;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
