本地 RAG 知识库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

92 lines
2.6 KiB

package com.wok.supportbot.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.wok.supportbot.handler.PostgresJsonTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
/**
* 看板快照实体
* 每日凌晨汇总前一天的运营指标数据
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "dashboard_snapshot", autoResultMap = true)
public class DashboardSnapshot implements Serializable {
@Serial
@TableField(exist = false)
private static final long serialVersionUID = 1L;
/** 主键ID(雪花算法) */
@TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/** 快照日期(唯一) */
@TableField("snapshot_date")
private Date snapshotDate;
/** 对话数 */
@TableField("conversation_count")
private Integer conversationCount;
/** 消息数 */
@TableField("message_count")
private Integer messageCount;
/** 满意率(0~1) */
@TableField("satisfaction_rate")
private Double satisfactionRate;
/** 点赞数 */
@TableField("thumbs_up_count")
private Integer thumbsUpCount;
/** 点踩数 */
@TableField("thumbs_down_count")
private Integer thumbsDownCount;
/** RAG 命中数 */
@TableField("rag_hit_count")
private Integer ragHitCount;
/** RAG 未命中数 */
@TableField("rag_miss_count")
private Integer ragMissCount;
/** 平均响应时间(毫秒) */
@TableField("avg_response_time")
private Double avgResponseTime;
/** 热门问题 TOP 列表(JSONB) */
@TableField(value = "top_questions", typeHandler = PostgresJsonTypeHandler.class)
private Map<String, Object> topQuestions;
/** 命中文档 TOP 列表(JSONB) */
@TableField(value = "top_hit_documents", typeHandler = PostgresJsonTypeHandler.class)
private Map<String, Object> topHitDocuments;
/** 未命中问题列表(JSONB) */
@TableField(value = "miss_questions", typeHandler = PostgresJsonTypeHandler.class)
private Map<String, Object> missQuestions;
/** 创建时间 */
@TableField(value = "create_time", fill = FieldFill.INSERT)
private Date createTime;
/** 更新时间 */
@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
}