| package com.example.myproject.entity; |
| |
| import javax.persistence.*; |
| import java.util.Date; |
| |
| @Entity |
| @Table(name = "group_comments") |
| public class GroupComments { |
| |
| @Id |
| @GeneratedValue(strategy = GenerationType.IDENTITY) |
| @Column(name = "comment_id") |
| private Long commentId; // 评论ID |
| |
| @Column(name = "group_post_id") |
| private Long groupPostId; |
| |
| @Column(name = "user_id") |
| private Long userId; |
| |
| private String content; |
| |
| @Column(name = "parent_comment_id") |
| private Long parentCommentId; |
| |
| @Column(name = "time") |
| private Date time; // 评论时间 |
| |
| // Getters and Setters |
| public Long getCommentId() { |
| return commentId; |
| } |
| |
| public void setCommentId(Long commentId) { |
| this.commentId = commentId; |
| } |
| |
| public Long getGroupPostId() { |
| return groupPostId; |
| } |
| |
| public void setGroupPostId(Long groupPostId) { |
| this.groupPostId = groupPostId; |
| } |
| |
| 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 Long getParentCommentId() { |
| return parentCommentId; |
| } |
| |
| public void setParentCommentId(Long parentCommentId) { |
| this.parentCommentId = parentCommentId; |
| } |
| |
| public Date getTime() { |
| return time; |
| } |
| |
| public void setTime(Date time) { |
| this.time = time; |
| } |
| } |