| 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; |
| } |
| } |