注册登录,用户等级,社交,动态,新手任务
Change-Id: I1d3183526517fb3c0dab665e0e7547eefa5c9d76
diff --git a/src/main/java/com/example/myproject/entity/GroupPost.java b/src/main/java/com/example/myproject/entity/GroupPost.java
new file mode 100644
index 0000000..89867f7
--- /dev/null
+++ b/src/main/java/com/example/myproject/entity/GroupPost.java
@@ -0,0 +1,109 @@
+package com.example.myproject.entity;
+
+import javax.persistence.*;
+import java.util.Date;
+
+@Entity
+@Table(name = "group_post")
+public class GroupPost {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "group_post_id")
+ private Long groupPostId;
+
+ @Column(name = "group_id")
+ private Long groupId;
+
+ @Column(name = "user_id")
+ private Long userId;
+
+ private String content;
+
+ private String image;
+
+ @Column(name = "like_count")
+ private Integer likeCount;
+
+ @Column(name = "comment_count")
+ private Integer commentCount; // 帖子评论数
+
+ @Column(name = "time")
+ private Date time; // 帖子创建时间
+
+ private String title;
+
+
+ // Getters and Setters
+ public Long getGroupPostId() {
+ return groupPostId;
+ }
+
+ public void setGroupPostId(Long groupPostId) {
+ this.groupPostId = groupPostId;
+ }
+
+ public Long getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(Long groupId) {
+ this.groupId = groupId;
+ }
+
+ public Long getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Long userId) {
+ this.userId = userId;
+ }
+
+ public String getContent() {
+ return content;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+ public String getImage() {
+ return image;
+ }
+
+ public void setImage(String image) {
+ this.image = image;
+ }
+
+ public Integer getLikeCount() {
+ return likeCount;
+ }
+
+ public void setLikeCount(Integer likeCount) {
+ this.likeCount = likeCount;
+ }
+
+ public Integer getCommentCount() {
+ return commentCount;
+ }
+
+ public void setCommentCount(Integer commentCount) {
+ this.commentCount = commentCount;
+ }
+
+ public Date getTime() {
+ return time;
+ }
+
+ public void setTime(Date time) {
+ this.time = time;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+}