| package com.example.myproject.entity; |
| |
| import javax.persistence.*; |
| import java.util.Date; |
| |
| @Entity |
| @Table(name = "dynamic_comment") |
| public class DynamicComment { |
| |
| @Id |
| @GeneratedValue(strategy = GenerationType.IDENTITY) |
| @Column(name = "comment_id") |
| private Long commentId; |
| |
| @Column(name = "dynamic_id") |
| private Long dynamicId; |
| |
| @Column(name = "user_id") |
| private Long userId; |
| |
| @Column(name = "comment_content") |
| private String commentContent; |
| |
| @Column(name = "comment_time") |
| private Date commentTime; |
| |
| @Column(name = "is_anonymous") |
| private Boolean isAnonymous = false; |
| |
| @Column(name = "parent_comment_id") |
| private Long parentCommentId; |
| |
| // Getters and Setters |
| public Long getCommentId() { |
| return commentId; |
| } |
| |
| public void setCommentId(Long commentId) { |
| this.commentId = commentId; |
| } |
| |
| public Long getDynamicId() { |
| return dynamicId; |
| } |
| |
| public void setDynamicId(Long dynamicId) { |
| this.dynamicId = dynamicId; |
| } |
| |
| public Long getUserId() { |
| return userId; |
| } |
| |
| public void setUserId(Long userId) { |
| this.userId = userId; |
| } |
| |
| public String getCommentContent() { |
| return commentContent; |
| } |
| |
| public void setCommentContent(String commentContent) { |
| this.commentContent = commentContent; |
| } |
| |
| public Date getCommentTime() { |
| return commentTime; |
| } |
| |
| public void setCommentTime(Date commentTime) { |
| this.commentTime = commentTime; |
| } |
| |
| public Boolean getIsAnonymous() { |
| return isAnonymous; |
| } |
| |
| public void setIsAnonymous(Boolean isAnonymous) { |
| this.isAnonymous = isAnonymous; |
| } |
| |
| public Long getParentCommentId() { |
| return parentCommentId; |
| } |
| |
| public void setParentCommentId(Long parentCommentId) { |
| this.parentCommentId = parentCommentId; |
| } |
| } |