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

}
