123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- package com.zhentao.groups.pojo;
- 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.Data;
- /**
- * 群组表
- * @TableName groups
- */
- @TableName(value ="groups")
- @Data
- public class Groups implements Serializable {
- /**
- * id
- */
- @TableId(type = IdType.AUTO)
- private Long groupId;
- /**
- * 群名称
- */
- private String name;
- /**
- * 创建者ID
- */
- private Long creatorId;
- /**
- * 群头像
- */
- private String avatar;
- /**
- * 群公告
- */
- private String announcement;
- /**
- * 群描述
- */
- private String description;
- /**
- * 最大成员数
- */
- private Integer maxMembers;
- /**
- * 状态(0-解散,1-正常)
- */
- private Integer status;
- /**
- * 创建时间
- */
- private Date createdAt;
- /**
- * 修改时间
- */
- private Date updatedAt;
- @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;
- }
- Groups other = (Groups) that;
- return (this.getGroupId() == null ? other.getGroupId() == null : this.getGroupId().equals(other.getGroupId()))
- && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
- && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId()))
- && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
- && (this.getAnnouncement() == null ? other.getAnnouncement() == null : this.getAnnouncement().equals(other.getAnnouncement()))
- && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
- && (this.getMaxMembers() == null ? other.getMaxMembers() == null : this.getMaxMembers().equals(other.getMaxMembers()))
- && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
- && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
- && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
- }
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((getGroupId() == null) ? 0 : getGroupId().hashCode());
- result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
- result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode());
- result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
- result = prime * result + ((getAnnouncement() == null) ? 0 : getAnnouncement().hashCode());
- result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
- result = prime * result + ((getMaxMembers() == null) ? 0 : getMaxMembers().hashCode());
- result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
- result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
- result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
- return result;
- }
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append(getClass().getSimpleName());
- sb.append(" [");
- sb.append("Hash = ").append(hashCode());
- sb.append(", groupId=").append(groupId);
- sb.append(", name=").append(name);
- sb.append(", creatorId=").append(creatorId);
- sb.append(", avatar=").append(avatar);
- sb.append(", announcement=").append(announcement);
- sb.append(", description=").append(description);
- sb.append(", maxMembers=").append(maxMembers);
- sb.append(", status=").append(status);
- sb.append(", createdAt=").append(createdAt);
- sb.append(", updatedAt=").append(updatedAt);
- sb.append(", serialVersionUID=").append(serialVersionUID);
- sb.append("]");
- return sb.toString();
- }
- }
|