22301138 | f682451 | 2025-06-04 02:03:13 +0800 | [diff] [blame] | 1 | package com.example.myproject.entity; |
| 2 | |
| 3 | import javax.persistence.*; |
| 4 | import java.util.Date; |
| 5 | |
| 6 | @Entity |
| 7 | @Table(name = "group_interests") |
| 8 | public class Group { |
| 9 | |
| 10 | @Id |
| 11 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 12 | @Column(name = "group_id") |
| 13 | private Long groupId; |
| 14 | |
| 15 | @Column(name = "group_name") |
| 16 | private String groupName; |
| 17 | |
| 18 | private String description; // 小组简介 |
| 19 | |
| 20 | @Column(name = "create_time") |
| 21 | private Date createTime; // 创建时间 |
| 22 | |
| 23 | @Column(name = "user_id") |
| 24 | private Long userId; // 创建该小组的用户ID |
| 25 | |
| 26 | @Column(name = "member_count") |
| 27 | private Integer memberCount; // 小组成员人数 |
| 28 | |
| 29 | private String category; // 小组类别 |
| 30 | |
| 31 | @Column(name = "cover_image") |
| 32 | private String coverImage; // 小组封面图片 |
| 33 | |
| 34 | // Getters and Setters |
| 35 | public Long getGroupId() { |
| 36 | return groupId; |
| 37 | } |
| 38 | |
| 39 | public void setGroupId(Long groupId) { |
| 40 | this.groupId = groupId; |
| 41 | } |
| 42 | |
| 43 | public String getGroupName() { |
| 44 | return groupName; |
| 45 | } |
| 46 | |
| 47 | public void setGroupName(String groupName) { |
| 48 | this.groupName = groupName; |
| 49 | } |
| 50 | |
| 51 | public String getDescription() { |
| 52 | return description; |
| 53 | } |
| 54 | |
| 55 | public void setDescription(String description) { |
| 56 | this.description = description; |
| 57 | } |
| 58 | |
| 59 | public Date getCreateTime() { |
| 60 | return createTime; |
| 61 | } |
| 62 | |
| 63 | public void setCreateTime(Date createTime) { |
| 64 | this.createTime = createTime; |
| 65 | } |
| 66 | |
| 67 | public Long getUserId() { |
| 68 | return userId; |
| 69 | } |
| 70 | |
| 71 | public void setUserId(Long userId) { |
| 72 | this.userId = userId; |
| 73 | } |
| 74 | |
| 75 | public Integer getMemberCount() { |
| 76 | return memberCount; |
| 77 | } |
| 78 | |
| 79 | public void setMemberCount(Integer memberCount) { |
| 80 | this.memberCount = memberCount; |
| 81 | } |
| 82 | |
| 83 | public String getCategory() { |
| 84 | return category; |
| 85 | } |
| 86 | |
| 87 | public void setCategory(String category) { |
| 88 | this.category = category; |
| 89 | } |
| 90 | |
| 91 | public String getCoverImage() { |
| 92 | return coverImage; |
| 93 | } |
| 94 | |
| 95 | public void setCoverImage(String coverImage) { |
| 96 | this.coverImage = coverImage; |
| 97 | } |
| 98 | } |