|
@@ -0,0 +1,192 @@
|
|
|
+package com.dt.common.domain;
|
|
|
+
|
|
|
+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 java.util.Date;
|
|
|
+import lombok.Data;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 用户表
|
|
|
+ * @TableName user
|
|
|
+ */
|
|
|
+@TableName(value ="user")
|
|
|
+@Data
|
|
|
+public class User {
|
|
|
+ /**
|
|
|
+ * 用户ID
|
|
|
+ */
|
|
|
+ @TableId(type = IdType.AUTO)
|
|
|
+ private Long id;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 用户名
|
|
|
+ */
|
|
|
+ private String username;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 密码(BCrypt加密)
|
|
|
+ */
|
|
|
+ private String password;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 真实姓名
|
|
|
+ */
|
|
|
+ private String realName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 手机号
|
|
|
+ */
|
|
|
+ private String phone;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 邮箱
|
|
|
+ */
|
|
|
+ private String email;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 头像URL
|
|
|
+ */
|
|
|
+ private String avatar;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 性别(0-未知,1-男,2-女)
|
|
|
+ */
|
|
|
+ private Integer gender;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 出生日期
|
|
|
+ */
|
|
|
+ private Date birthDate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 状态(0-禁用,1-正常)
|
|
|
+ */
|
|
|
+ private Integer status;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 最后登录时间
|
|
|
+ */
|
|
|
+ private Date lastLoginTime;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 最后登录IP
|
|
|
+ */
|
|
|
+ private String lastLoginIp;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 最后登录设备
|
|
|
+ */
|
|
|
+ private String lastLoginDevice;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 人脸图片URL
|
|
|
+ */
|
|
|
+ private String faceImageUrl;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否启用人脸登录(0-禁用,1-启用)
|
|
|
+ */
|
|
|
+ private Integer faceLoginEnabled;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 创建时间
|
|
|
+ */
|
|
|
+ private Date createdAt;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新时间
|
|
|
+ */
|
|
|
+ private Date updatedAt;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否删除(0-未删除,1-已删除)
|
|
|
+ */
|
|
|
+ private Integer deleted;
|
|
|
+
|
|
|
+ @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.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
|
|
+ && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
|
|
|
+ && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
|
|
|
+ && (this.getRealName() == null ? other.getRealName() == null : this.getRealName().equals(other.getRealName()))
|
|
|
+ && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
|
|
|
+ && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
|
|
|
+ && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
|
|
|
+ && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
|
|
|
+ && (this.getBirthDate() == null ? other.getBirthDate() == null : this.getBirthDate().equals(other.getBirthDate()))
|
|
|
+ && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
|
|
+ && (this.getLastLoginTime() == null ? other.getLastLoginTime() == null : this.getLastLoginTime().equals(other.getLastLoginTime()))
|
|
|
+ && (this.getLastLoginIp() == null ? other.getLastLoginIp() == null : this.getLastLoginIp().equals(other.getLastLoginIp()))
|
|
|
+ && (this.getLastLoginDevice() == null ? other.getLastLoginDevice() == null : this.getLastLoginDevice().equals(other.getLastLoginDevice()))
|
|
|
+ && (this.getFaceImageUrl() == null ? other.getFaceImageUrl() == null : this.getFaceImageUrl().equals(other.getFaceImageUrl()))
|
|
|
+ && (this.getFaceLoginEnabled() == null ? other.getFaceLoginEnabled() == null : this.getFaceLoginEnabled().equals(other.getFaceLoginEnabled()))
|
|
|
+ && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
|
|
|
+ && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()))
|
|
|
+ && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ final int prime = 31;
|
|
|
+ int result = 1;
|
|
|
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
|
|
+ result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
|
|
|
+ result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
|
|
|
+ result = prime * result + ((getRealName() == null) ? 0 : getRealName().hashCode());
|
|
|
+ result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
|
|
|
+ result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
|
|
|
+ result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
|
|
|
+ result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
|
|
|
+ result = prime * result + ((getBirthDate() == null) ? 0 : getBirthDate().hashCode());
|
|
|
+ result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
|
|
+ result = prime * result + ((getLastLoginTime() == null) ? 0 : getLastLoginTime().hashCode());
|
|
|
+ result = prime * result + ((getLastLoginIp() == null) ? 0 : getLastLoginIp().hashCode());
|
|
|
+ result = prime * result + ((getLastLoginDevice() == null) ? 0 : getLastLoginDevice().hashCode());
|
|
|
+ result = prime * result + ((getFaceImageUrl() == null) ? 0 : getFaceImageUrl().hashCode());
|
|
|
+ result = prime * result + ((getFaceLoginEnabled() == null) ? 0 : getFaceLoginEnabled().hashCode());
|
|
|
+ result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
|
|
|
+ result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
|
|
|
+ result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ sb.append(getClass().getSimpleName());
|
|
|
+ sb.append(" [");
|
|
|
+ sb.append("Hash = ").append(hashCode());
|
|
|
+ sb.append(", id=").append(id);
|
|
|
+ sb.append(", username=").append(username);
|
|
|
+ sb.append(", password=").append(password);
|
|
|
+ sb.append(", realName=").append(realName);
|
|
|
+ sb.append(", phone=").append(phone);
|
|
|
+ sb.append(", email=").append(email);
|
|
|
+ sb.append(", avatar=").append(avatar);
|
|
|
+ sb.append(", gender=").append(gender);
|
|
|
+ sb.append(", birthDate=").append(birthDate);
|
|
|
+ sb.append(", status=").append(status);
|
|
|
+ sb.append(", lastLoginTime=").append(lastLoginTime);
|
|
|
+ sb.append(", lastLoginIp=").append(lastLoginIp);
|
|
|
+ sb.append(", lastLoginDevice=").append(lastLoginDevice);
|
|
|
+ sb.append(", faceImageUrl=").append(faceImageUrl);
|
|
|
+ sb.append(", faceLoginEnabled=").append(faceLoginEnabled);
|
|
|
+ sb.append(", createdAt=").append(createdAt);
|
|
|
+ sb.append(", updatedAt=").append(updatedAt);
|
|
|
+ sb.append(", deleted=").append(deleted);
|
|
|
+ sb.append("]");
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+}
|