对象存储-初始化

This commit is contained in:
2026-02-05 16:27:39 +08:00
parent ab574032c0
commit 468e2e45a5
35 changed files with 1579 additions and 0 deletions

View File

@@ -0,0 +1,160 @@
package com.blog.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 java.io.Serializable;
import java.util.Date;
import lombok.Builder;
import lombok.Data;
/**
* 文章表
* @TableName sys_article
*/
@TableName(value ="sys_article")
@Data
@Builder
public class ArticleEntity implements Serializable {
/**
*
*/
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 作者ID
*/
private Long authorId;
/**
* 0-草稿, 1-发布, 2下架, 3删除
*/
private Integer status;
/**
* 浏览数
*/
private Long views;
/**
* 收藏数
*/
private Long collectionCount;
/**
* 点赞数
*/
private Long likeCount;
/**
* 点踩数
*/
private Long downvoteCount;
/**
* 发布日期
*/
private Date releaseDate;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
*
*/
private Integer isDeleted;
@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;
}
ArticleEntity other = (ArticleEntity) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
&& (this.getAuthorId() == null ? other.getAuthorId() == null : this.getAuthorId().equals(other.getAuthorId()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getViews() == null ? other.getViews() == null : this.getViews().equals(other.getViews()))
&& (this.getCollectionCount() == null ? other.getCollectionCount() == null : this.getCollectionCount().equals(other.getCollectionCount()))
&& (this.getLikeCount() == null ? other.getLikeCount() == null : this.getLikeCount().equals(other.getLikeCount()))
&& (this.getDownvoteCount() == null ? other.getDownvoteCount() == null : this.getDownvoteCount().equals(other.getDownvoteCount()))
&& (this.getReleaseDate() == null ? other.getReleaseDate() == null : this.getReleaseDate().equals(other.getReleaseDate()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
result = prime * result + ((getAuthorId() == null) ? 0 : getAuthorId().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getViews() == null) ? 0 : getViews().hashCode());
result = prime * result + ((getCollectionCount() == null) ? 0 : getCollectionCount().hashCode());
result = prime * result + ((getLikeCount() == null) ? 0 : getLikeCount().hashCode());
result = prime * result + ((getDownvoteCount() == null) ? 0 : getDownvoteCount().hashCode());
result = prime * result + ((getReleaseDate() == null) ? 0 : getReleaseDate().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().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(", title=").append(title);
sb.append(", content=").append(content);
sb.append(", authorId=").append(authorId);
sb.append(", status=").append(status);
sb.append(", views=").append(views);
sb.append(", collectionCount=").append(collectionCount);
sb.append(", likeCount=").append(likeCount);
sb.append(", downvoteCount=").append(downvoteCount);
sb.append(", releaseDate=").append(releaseDate);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", isDeleted=").append(isDeleted);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

View File

@@ -0,0 +1,152 @@
package com.blog.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 java.io.Serializable;
import java.util.Date;
import lombok.Builder;
import lombok.Data;
/**
* 文件元数据映射表
* @TableName sys_file
*/
@TableName(value ="sys_file")
@Data
@Builder
public class FileEntity implements Serializable {
/**
* 主键ID
*/
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 别名
*/
private String aliasName;
/**
* 文件原始名称
*/
private String fileName;
/**
* MinIO存储对象名通常是UUID+后缀)
*/
private String storageName;
/**
* 存储桶名称
*/
private String bucketName;
/**
* 文件大小(bytes)
*/
private Long fileSize;
/**
* 文件MIME类型
*/
private String fileType;
/**
* 访问地址(临时或持久)
*/
private String fileUrl;
/**
* 上传者ID
*/
private String userId;
/**
* 关联的请求链路ID
*/
private String traceId;
/**
* 逻辑删除
*/
private Integer isDeleted;
/**
* 上传时间
*/
private Date createTime;
@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;
}
FileEntity other = (FileEntity) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getAliasName() == null ? other.getAliasName() == null : this.getAliasName().equals(other.getAliasName()))
&& (this.getFileName() == null ? other.getFileName() == null : this.getFileName().equals(other.getFileName()))
&& (this.getStorageName() == null ? other.getStorageName() == null : this.getStorageName().equals(other.getStorageName()))
&& (this.getBucketName() == null ? other.getBucketName() == null : this.getBucketName().equals(other.getBucketName()))
&& (this.getFileSize() == null ? other.getFileSize() == null : this.getFileSize().equals(other.getFileSize()))
&& (this.getFileType() == null ? other.getFileType() == null : this.getFileType().equals(other.getFileType()))
&& (this.getFileUrl() == null ? other.getFileUrl() == null : this.getFileUrl().equals(other.getFileUrl()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getTraceId() == null ? other.getTraceId() == null : this.getTraceId().equals(other.getTraceId()))
&& (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getAliasName() == null) ? 0 : getAliasName().hashCode());
result = prime * result + ((getFileName() == null) ? 0 : getFileName().hashCode());
result = prime * result + ((getStorageName() == null) ? 0 : getStorageName().hashCode());
result = prime * result + ((getBucketName() == null) ? 0 : getBucketName().hashCode());
result = prime * result + ((getFileSize() == null) ? 0 : getFileSize().hashCode());
result = prime * result + ((getFileType() == null) ? 0 : getFileType().hashCode());
result = prime * result + ((getFileUrl() == null) ? 0 : getFileUrl().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getTraceId() == null) ? 0 : getTraceId().hashCode());
result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", aliasName=").append(aliasName);
sb.append(", fileName=").append(fileName);
sb.append(", storageName=").append(storageName);
sb.append(", bucketName=").append(bucketName);
sb.append(", fileSize=").append(fileSize);
sb.append(", fileType=").append(fileType);
sb.append(", fileUrl=").append(fileUrl);
sb.append(", userId=").append(userId);
sb.append(", traceId=").append(traceId);
sb.append(", isDeleted=").append(isDeleted);
sb.append(", createTime=").append(createTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

View File

@@ -0,0 +1,120 @@
package com.blog.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 java.io.Serializable;
import java.util.Date;
import lombok.Builder;
import lombok.Data;
/**
* 邀请码表
* @TableName sys_invite_code
*/
@TableName(value ="sys_invite_code")
@Data
@Builder
public class InviteCodeEntity implements Serializable {
/**
*
*/
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 唯一邀请码
*/
private String code;
/**
* 生成人ID
*/
private Long creatorId;
/**
* 最大使用次数
*/
private Integer maxUses;
/**
* 已使用次数
*/
private Integer usedCount;
/**
* 1-有效, 0-失效
*/
private Integer status;
/**
* 过期时间
*/
private Date expireTime;
/**
*
*/
private Date createTime;
@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;
}
InviteCodeEntity other = (InviteCodeEntity) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
&& (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId()))
&& (this.getMaxUses() == null ? other.getMaxUses() == null : this.getMaxUses().equals(other.getMaxUses()))
&& (this.getUsedCount() == null ? other.getUsedCount() == null : this.getUsedCount().equals(other.getUsedCount()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode());
result = prime * result + ((getMaxUses() == null) ? 0 : getMaxUses().hashCode());
result = prime * result + ((getUsedCount() == null) ? 0 : getUsedCount().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", code=").append(code);
sb.append(", creatorId=").append(creatorId);
sb.append(", maxUses=").append(maxUses);
sb.append(", usedCount=").append(usedCount);
sb.append(", status=").append(status);
sb.append(", expireTime=").append(expireTime);
sb.append(", createTime=").append(createTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

View File

@@ -0,0 +1,95 @@
package com.blog.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 java.io.Serializable;
import lombok.Builder;
import lombok.Data;
/**
* 文件目录映射表
* @TableName sys_path
*/
@TableName(value ="sys_path")
@Data
@Builder
public class PathEntity implements Serializable {
/**
* 主键ID
*/
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 目录名
*/
private String pathName;
/**
* 上传者ID
*/
private Long userId;
/**
* 父目录ID
*/
private Long parentId;
/**
* 逻辑删除
*/
private Integer isDeleted;
@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;
}
PathEntity other = (PathEntity) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getPathName() == null ? other.getPathName() == null : this.getPathName().equals(other.getPathName()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
&& (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getPathName() == null) ? 0 : getPathName().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().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(", pathName=").append(pathName);
sb.append(", userId=").append(userId);
sb.append(", parentId=").append(parentId);
sb.append(", isDeleted=").append(isDeleted);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

View File

@@ -0,0 +1,71 @@
package com.blog.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 java.io.Serializable;
import lombok.Builder;
import lombok.Data;
/**
* 目录文件映射表
* @TableName sys_path_file
*/
@TableName(value ="sys_path_file")
@Data
@Builder
public class PathFileEntity implements Serializable {
/**
* 目录ID
*/
private Long pathId;
/**
* 文件ID
*/
@TableId
private Long fileId;
@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;
}
PathFileEntity other = (PathFileEntity) that;
return (this.getPathId() == null ? other.getPathId() == null : this.getPathId().equals(other.getPathId()))
&& (this.getFileId() == null ? other.getFileId() == null : this.getFileId().equals(other.getFileId()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getPathId() == null) ? 0 : getPathId().hashCode());
result = prime * result + ((getFileId() == null) ? 0 : getFileId().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", pathId=").append(pathId);
sb.append(", fileId=").append(fileId);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

View File

@@ -0,0 +1,112 @@
package com.blog.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 java.io.Serializable;
import java.util.Date;
import lombok.Builder;
import lombok.Data;
/**
* 角色表
* @TableName sys_role
*/
@TableName(value ="sys_role")
@Data
@Builder
public class RoleEntity implements Serializable {
/**
*
*/
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 角色名称(如:超级管理员)
*/
private String name;
/**
* 角色标识(如:ROLE_ADMIN)
*/
private String code;
/**
* 描述
*/
private String description;
/**
* 状态(1:正常, 0:禁用)
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
@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;
}
RoleEntity other = (RoleEntity) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
&& (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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(", name=").append(name);
sb.append(", code=").append(code);
sb.append(", description=").append(description);
sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

View File

@@ -0,0 +1,178 @@
package com.blog.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 java.io.Serializable;
import java.util.Date;
import com.blog.dto.UserRegisterDto;
import lombok.Builder;
import lombok.Data;
/**
* 用户表
* @TableName sys_user
*/
@TableName(value ="sys_user")
@Data
@Builder
public class UserEntity implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 用户名
*/
private String username;
/**
* 密码(BCrypt加密)
*/
private String password;
/**
* 用户昵称
*/
private String nickname;
/**
* 邮箱
*/
private String email;
/**
* 手机号
*/
private String phone;
/**
* 头像URL
*/
private String avatar;
/**
* 性别: 1男, 2女, 0未知
*/
private Integer gender;
/**
* 状态: 1启用, 0禁用
*/
private Integer enabled;
/**
* 使用的邀请码ID
*/
private Long inviteCodeId;
/**
* 解禁日期
*/
private Date releaseDate;
/**
* 注册时间
*/
private Date createTime;
/**
* 最后修改时间
*/
private Date updateTime;
/**
* 逻辑删除标记0-未删, 1-已删
*/
private Integer isDeleted;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
public static UserEntity castFromRegisterDto(UserRegisterDto userDto, String password, Long inviteCodeId) {
return UserEntity.builder()
.username(userDto.getUsername())
.password(password)
.email(userDto.getEmail())
.inviteCodeId(inviteCodeId)
.build();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
UserEntity other = (UserEntity) 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.getNickname() == null ? other.getNickname() == null : this.getNickname().equals(other.getNickname()))
&& (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
&& (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
&& (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
&& (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
&& (this.getEnabled() == null ? other.getEnabled() == null : this.getEnabled().equals(other.getEnabled()))
&& (this.getInviteCodeId() == null ? other.getInviteCodeId() == null : this.getInviteCodeId().equals(other.getInviteCodeId()))
&& (this.getReleaseDate() == null ? other.getReleaseDate() == null : this.getReleaseDate().equals(other.getReleaseDate()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
}
@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 + ((getNickname() == null) ? 0 : getNickname().hashCode());
result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
result = prime * result + ((getEnabled() == null) ? 0 : getEnabled().hashCode());
result = prime * result + ((getInviteCodeId() == null) ? 0 : getInviteCodeId().hashCode());
result = prime * result + ((getReleaseDate() == null) ? 0 : getReleaseDate().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().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(", nickname=").append(nickname);
sb.append(", email=").append(email);
sb.append(", phone=").append(phone);
sb.append(", avatar=").append(avatar);
sb.append(", gender=").append(gender);
sb.append(", enabled=").append(enabled);
sb.append(", inviteCodeId=").append(inviteCodeId);
sb.append(", releaseDate=").append(releaseDate);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", isDeleted=").append(isDeleted);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}