package com.emotionmuseum.entity; import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import lombok.EqualsAndHashCode; import java.time.LocalDateTime; /** * 评论实体类 * * @author emotion-museum * @version 1.0.0 * @since 2024-01-01 */ @Data @EqualsAndHashCode(callSuper = false) @TableName("comment") public class Comment { /** * 评论ID */ @TableId(type = IdType.ASSIGN_ID) private String id; /** * 父评论ID (用于回复功能) */ private String parentId; /** * 内容类型 (DIARY, POST) */ private String contentType; /** * 内容ID */ private String contentId; /** * 评论者ID */ private String userId; /** * 评论内容 */ private String content; /** * 点赞数 */ private Integer likeCount; /** * 回复数 */ private Integer replyCount; /** * 状态 (0:待审核, 1:正常, 2:已删除) */ private Integer status; /** * 创建时间 */ @TableField(fill = FieldFill.INSERT) private LocalDateTime createTime; /** * 更新时间 */ @TableField(fill = FieldFill.INSERT_UPDATE) private LocalDateTime updateTime; /** * 是否删除 (0:未删除, 1:已删除) */ @TableLogic private Integer deleted; }