| package com.example.myproject.entity; |
| |
| import javax.persistence.*; |
| import java.util.Date; |
| |
| @Entity |
| @Table(name = "group_interests") |
| public class Group { |
| |
| @Id |
| @GeneratedValue(strategy = GenerationType.IDENTITY) |
| @Column(name = "group_id") |
| private Long groupId; |
| |
| @Column(name = "group_name") |
| private String groupName; |
| |
| private String description; // 小组简介 |
| |
| @Column(name = "create_time") |
| private Date createTime; // 创建时间 |
| |
| @Column(name = "user_id") |
| private Long userId; // 创建该小组的用户ID |
| |
| @Column(name = "member_count") |
| private Integer memberCount; // 小组成员人数 |
| |
| private String category; // 小组类别 |
| |
| @Column(name = "cover_image") |
| private String coverImage; // 小组封面图片 |
| |
| // Getters and Setters |
| public Long getGroupId() { |
| return groupId; |
| } |
| |
| public void setGroupId(Long groupId) { |
| this.groupId = groupId; |
| } |
| |
| public String getGroupName() { |
| return groupName; |
| } |
| |
| public void setGroupName(String groupName) { |
| this.groupName = groupName; |
| } |
| |
| public String getDescription() { |
| return description; |
| } |
| |
| public void setDescription(String description) { |
| this.description = description; |
| } |
| |
| public Date getCreateTime() { |
| return createTime; |
| } |
| |
| public void setCreateTime(Date createTime) { |
| this.createTime = createTime; |
| } |
| |
| public Long getUserId() { |
| return userId; |
| } |
| |
| public void setUserId(Long userId) { |
| this.userId = userId; |
| } |
| |
| public Integer getMemberCount() { |
| return memberCount; |
| } |
| |
| public void setMemberCount(Integer memberCount) { |
| this.memberCount = memberCount; |
| } |
| |
| public String getCategory() { |
| return category; |
| } |
| |
| public void setCategory(String category) { |
| this.category = category; |
| } |
| |
| public String getCoverImage() { |
| return coverImage; |
| } |
| |
| public void setCoverImage(String coverImage) { |
| this.coverImage = coverImage; |
| } |
| } |