feat: 完成情绪博物馆项目重构和功能增强 - 新增日记评论和帖子功能 - 重构前端架构,优化用户体验 - 完善WebSocket通信机制 - 更新项目文档和部署配置
This commit is contained in:
@@ -0,0 +1,129 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 日记评论实体类
|
||||
*
|
||||
* @author emotion-museum
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("diary_comment")
|
||||
public class DiaryComment extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 日记ID
|
||||
*/
|
||||
@TableField("diary_id")
|
||||
private String diaryId;
|
||||
|
||||
/**
|
||||
* 评论用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 父评论ID (用于回复功能)
|
||||
*/
|
||||
@TableField("parent_comment_id")
|
||||
private String parentCommentId;
|
||||
|
||||
/**
|
||||
* 评论内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 评论图片 (存储图片URL数组)
|
||||
*/
|
||||
@TableField("images")
|
||||
private String images;
|
||||
|
||||
/**
|
||||
* 评论类型: user-用户评论, ai-AI评论, system-系统评论
|
||||
*/
|
||||
@TableField("comment_type")
|
||||
private String commentType;
|
||||
|
||||
/**
|
||||
* AI评论来源 (如: emotion_analysis, sentiment_analysis)
|
||||
*/
|
||||
@TableField("ai_comment_source")
|
||||
private String aiCommentSource;
|
||||
|
||||
/**
|
||||
* 点赞数
|
||||
*/
|
||||
@TableField("like_count")
|
||||
private Integer likeCount;
|
||||
|
||||
/**
|
||||
* 回复数
|
||||
*/
|
||||
@TableField("reply_count")
|
||||
private Integer replyCount;
|
||||
|
||||
/**
|
||||
* 是否匿名评论: 0-实名, 1-匿名
|
||||
*/
|
||||
@TableField("is_anonymous")
|
||||
private Integer isAnonymous;
|
||||
|
||||
/**
|
||||
* 是否置顶: 0-普通, 1-置顶
|
||||
*/
|
||||
@TableField("is_top")
|
||||
private Integer isTop;
|
||||
|
||||
/**
|
||||
* 状态: published-已发布, hidden-隐藏, deleted-已删除
|
||||
*/
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@TableField("publish_time")
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
/**
|
||||
* 最后回复时间
|
||||
*/
|
||||
@TableField("last_reply_time")
|
||||
private LocalDateTime lastReplyTime;
|
||||
|
||||
/**
|
||||
* 情绪评分
|
||||
*/
|
||||
@TableField("emotion_score")
|
||||
private BigDecimal emotionScore;
|
||||
|
||||
/**
|
||||
* 情感评分
|
||||
*/
|
||||
@TableField("sentiment_score")
|
||||
private BigDecimal sentimentScore;
|
||||
|
||||
/**
|
||||
* 扩展元数据
|
||||
*/
|
||||
@TableField("metadata")
|
||||
private String metadata;
|
||||
}
|
||||
Reference in New Issue
Block a user