blob: 89867f73646c64cf042dd3b4d9eabd68229f8204 [file] [log] [blame]
22301138f6824512025-06-04 02:03:13 +08001package com.example.myproject.entity;
2
3import javax.persistence.*;
4import java.util.Date;
5
6@Entity
7@Table(name = "group_post")
8public class GroupPost {
9
10 @Id
11 @GeneratedValue(strategy = GenerationType.IDENTITY)
12 @Column(name = "group_post_id")
13 private Long groupPostId;
14
15 @Column(name = "group_id")
16 private Long groupId;
17
18 @Column(name = "user_id")
19 private Long userId;
20
21 private String content;
22
23 private String image;
24
25 @Column(name = "like_count")
26 private Integer likeCount;
27
28 @Column(name = "comment_count")
29 private Integer commentCount; // 帖子评论数
30
31 @Column(name = "time")
32 private Date time; // 帖子创建时间
33
34 private String title;
35
36
37 // Getters and Setters
38 public Long getGroupPostId() {
39 return groupPostId;
40 }
41
42 public void setGroupPostId(Long groupPostId) {
43 this.groupPostId = groupPostId;
44 }
45
46 public Long getGroupId() {
47 return groupId;
48 }
49
50 public void setGroupId(Long groupId) {
51 this.groupId = groupId;
52 }
53
54 public Long getUserId() {
55 return userId;
56 }
57
58 public void setUserId(Long userId) {
59 this.userId = userId;
60 }
61
62 public String getContent() {
63 return content;
64 }
65
66 public void setContent(String content) {
67 this.content = content;
68 }
69
70 public String getImage() {
71 return image;
72 }
73
74 public void setImage(String image) {
75 this.image = image;
76 }
77
78 public Integer getLikeCount() {
79 return likeCount;
80 }
81
82 public void setLikeCount(Integer likeCount) {
83 this.likeCount = likeCount;
84 }
85
86 public Integer getCommentCount() {
87 return commentCount;
88 }
89
90 public void setCommentCount(Integer commentCount) {
91 this.commentCount = commentCount;
92 }
93
94 public Date getTime() {
95 return time;
96 }
97
98 public void setTime(Date time) {
99 this.time = time;
100 }
101
102 public String getTitle() {
103 return title;
104 }
105
106 public void setTitle(String title) {
107 this.title = title;
108 }
109}