22301138 | f682451 | 2025-06-04 02:03:13 +0800 | [diff] [blame^] | 1 | package com.example.myproject.entity; |
| 2 | |
| 3 | import javax.persistence.*; |
| 4 | import java.util.Date; |
| 5 | |
| 6 | @Entity |
| 7 | @Table(name = "dynamic_comment") |
| 8 | public class DynamicComment { |
| 9 | |
| 10 | @Id |
| 11 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 12 | @Column(name = "comment_id") |
| 13 | private Long commentId; |
| 14 | |
| 15 | @Column(name = "dynamic_id") |
| 16 | private Long dynamicId; |
| 17 | |
| 18 | @Column(name = "user_id") |
| 19 | private Long userId; |
| 20 | |
| 21 | @Column(name = "comment_content") |
| 22 | private String commentContent; |
| 23 | |
| 24 | @Column(name = "comment_time") |
| 25 | private Date commentTime; |
| 26 | |
| 27 | @Column(name = "is_anonymous") |
| 28 | private Boolean isAnonymous = false; |
| 29 | |
| 30 | @Column(name = "parent_comment_id") |
| 31 | private Long parentCommentId; |
| 32 | |
| 33 | // Getters and Setters |
| 34 | public Long getCommentId() { |
| 35 | return commentId; |
| 36 | } |
| 37 | |
| 38 | public void setCommentId(Long commentId) { |
| 39 | this.commentId = commentId; |
| 40 | } |
| 41 | |
| 42 | public Long getDynamicId() { |
| 43 | return dynamicId; |
| 44 | } |
| 45 | |
| 46 | public void setDynamicId(Long dynamicId) { |
| 47 | this.dynamicId = dynamicId; |
| 48 | } |
| 49 | |
| 50 | public Long getUserId() { |
| 51 | return userId; |
| 52 | } |
| 53 | |
| 54 | public void setUserId(Long userId) { |
| 55 | this.userId = userId; |
| 56 | } |
| 57 | |
| 58 | public String getCommentContent() { |
| 59 | return commentContent; |
| 60 | } |
| 61 | |
| 62 | public void setCommentContent(String commentContent) { |
| 63 | this.commentContent = commentContent; |
| 64 | } |
| 65 | |
| 66 | public Date getCommentTime() { |
| 67 | return commentTime; |
| 68 | } |
| 69 | |
| 70 | public void setCommentTime(Date commentTime) { |
| 71 | this.commentTime = commentTime; |
| 72 | } |
| 73 | |
| 74 | public Boolean getIsAnonymous() { |
| 75 | return isAnonymous; |
| 76 | } |
| 77 | |
| 78 | public void setIsAnonymous(Boolean isAnonymous) { |
| 79 | this.isAnonymous = isAnonymous; |
| 80 | } |
| 81 | |
| 82 | public Long getParentCommentId() { |
| 83 | return parentCommentId; |
| 84 | } |
| 85 | |
| 86 | public void setParentCommentId(Long parentCommentId) { |
| 87 | this.parentCommentId = parentCommentId; |
| 88 | } |
| 89 | } |