blob: 65f7fc6d180e62885d05b690b958843e55773112 [file] [log] [blame]
223011381c359102025-06-03 15:19:59 +08001package com.example.myproject.entity;
2
3import javax.persistence.*;
4
5@Entity
6@Table(name = "seed_comment_likes")
7public class SeedCommentLikes {
8
9 @Id
10 @GeneratedValue(strategy = GenerationType.IDENTITY)
11 @Column(name = "id")
12 private Long id; // 点赞ID
13
14 @Column(name = "comment_id", nullable = false)
15 private Long commentId; // 被点赞的评论ID
16
17 @Column(name = "user_id", nullable = false)
18 private Long userId; // 点赞的用户ID
19
20 @Column(name = "is_liked", nullable = false)
21 private Boolean isLiked = true; // 点赞状态,默认为true(点赞)
22
23 // Getters and Setters
24 public Long getId() {
25 return id;
26 }
27
28 public void setId(Long id) {
29 this.id = id;
30 }
31
32 public Long getCommentId() {
33 return commentId;
34 }
35
36 public void setCommentId(Long commentId) {
37 this.commentId = commentId;
38 }
39
40 public Long getUserId() {
41 return userId;
42 }
43
44 public void setUserId(Long userId) {
45 this.userId = userId;
46 }
47
48 public Boolean getIsLiked() {
49 return isLiked;
50 }
51
52 public void setIsLiked(Boolean isLiked) {
53 this.isLiked = isLiked;
54 }
55}