blob: 65f7fc6d180e62885d05b690b958843e55773112 [file] [log] [blame]
package com.example.myproject.entity;
import javax.persistence.*;
@Entity
@Table(name = "seed_comment_likes")
public class SeedCommentLikes {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id; // 点赞ID
@Column(name = "comment_id", nullable = false)
private Long commentId; // 被点赞的评论ID
@Column(name = "user_id", nullable = false)
private Long userId; // 点赞的用户ID
@Column(name = "is_liked", nullable = false)
private Boolean isLiked = true; // 点赞状态,默认为true(点赞)
// Getters and Setters
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCommentId() {
return commentId;
}
public void setCommentId(Long commentId) {
this.commentId = commentId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Boolean getIsLiked() {
return isLiked;
}
public void setIsLiked(Boolean isLiked) {
this.isLiked = isLiked;
}
}