重构评论

This commit is contained in:
Van0313
2025-05-02 20:39:46 +08:00
parent 5d89d84aa5
commit a9f247bf62
7 changed files with 169 additions and 357 deletions

View File

@@ -0,0 +1,50 @@
package cn.van.business.model.pl;
import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @author Leo
* @version 1.0
* @create 2025/6/4
* @description评论实体类
*/
@Entity
@Table(name = "comments")
@Data
public class Comment {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "product_id", nullable = false, columnDefinition = "TEXT")
private String productId;
@Column(name = "user_name", columnDefinition = "TEXT")
private String userName;
@Lob
@Column(name = "comment_text")
private String commentText;
@Column(name = "comment_id", length = 64, unique = true)
private String commentId;
@Column(name = "picture_urls", columnDefinition = "TEXT")
private String pictureUrls;
@Column(name = "created_at")
private LocalDateTime createdAt;
@Column(name = "comment_date")
private LocalDateTime commentDate;
@Column(name = "is_use")
private Integer isUse;
// Getters and Setters
}