package com.bruce.sams.domain.sys; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; /** * 系统用户表 * @TableName sys_user */ @TableName(value ="sys_user") @Data public class User { /** * 用户ID */ @TableId(type = IdType.AUTO) private Long userId; /** * 用户角色 */ private Long roleId; /** * 用户昵称 */ private String nickName; /** * 真实姓名 */ private String userName; /** * 用户密码 */ private String password; /** * 学号/教职工号 */ private String schoolId; /** * 所属院系 */ private Long collegeId; /** * 用户邮箱 */ private String email; /** * 头像地址 */ private String avatar; /** * 账号状态 */ private Object status; @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } User other = (User) 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.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword())) && (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.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())); } @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 + ((getPassword() == null) ? 0 : getPassword().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 + ((getAvatar() == null) ? 0 : getAvatar().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().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(", password=").append(password); sb.append(", schoolId=").append(schoolId); sb.append(", collegeId=").append(collegeId); sb.append(", email=").append(email); sb.append(", avatar=").append(avatar); sb.append(", status=").append(status); sb.append("]"); return sb.toString(); } }