package com.bruce.sams.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 lombok.Data; /** * 系统用户表 */ @TableName(value ="sys_user") @Data public class SysUser { /** * 用户ID */ @TableId(type = IdType.AUTO) private Long userId; /** * 用户角色 */ private Long roleId; /** * 用户昵称 */ private String nickName; /** * 真实姓名 */ private String userName; /** * 密码 */ private String passwd; /** * 学号/教职工号 */ private String schoolId; /** * 所属院系 */ private Long collegeId; /** * 用户邮箱 */ private String email; /** * 手机号码 */ private String phonenumber; /** * 用户性别(0男 1女 2未知) */ private String sex; /** * 头像地址 */ private String avatar; /** * 帐号状态(0正常 1停用) */ private String status; /** * 备注 */ private String remark; @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.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId())) && (this.getNickName() == null ? other.getNickName() == null : this.getNickName().equals(other.getNickName())) && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName())) && (this.getPasswd() == null ? other.getPasswd() == null : this.getPasswd().equals(other.getPasswd())) && (this.getSchoolId() == null ? other.getSchoolId() == null : this.getSchoolId().equals(other.getSchoolId())) && (this.getCollegeId() == null ? other.getCollegeId() == null : this.getCollegeId().equals(other.getCollegeId())) && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail())) && (this.getPhonenumber() == null ? other.getPhonenumber() == null : this.getPhonenumber().equals(other.getPhonenumber())) && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex())) && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode()); result = prime * result + ((getNickName() == null) ? 0 : getNickName().hashCode()); result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode()); result = prime * result + ((getPasswd() == null) ? 0 : getPasswd().hashCode()); result = prime * result + ((getSchoolId() == null) ? 0 : getSchoolId().hashCode()); result = prime * result + ((getCollegeId() == null) ? 0 : getCollegeId().hashCode()); result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode()); result = prime * result + ((getPhonenumber() == null) ? 0 : getPhonenumber().hashCode()); result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode()); result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", userId=").append(userId); sb.append(", roleId=").append(roleId); sb.append(", nickName=").append(nickName); sb.append(", userName=").append(userName); sb.append(", passwd=").append(passwd); sb.append(", schoolId=").append(schoolId); sb.append(", collegeId=").append(collegeId); sb.append(", email=").append(email); sb.append(", phonenumber=").append(phonenumber); sb.append(", sex=").append(sex); sb.append(", avatar=").append(avatar); sb.append(", status=").append(status); sb.append(", remark=").append(remark); sb.append("]"); return sb.toString(); } }