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.
116 lines
2.5 KiB
116 lines
2.5 KiB
package com.wok.supportbot.entity;
|
|
|
|
import com.baomidou.mybatisplus.annotation.*;
|
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Builder;
|
|
import lombok.Data;
|
|
import lombok.NoArgsConstructor;
|
|
|
|
import java.io.Serial;
|
|
import java.io.Serializable;
|
|
import java.util.Date;
|
|
|
|
/**
|
|
* FAQ 知识库实体
|
|
*/
|
|
@Data
|
|
@Builder
|
|
@AllArgsConstructor
|
|
@NoArgsConstructor
|
|
@TableName("knowledge_faq")
|
|
public class KnowledgeFaq implements Serializable {
|
|
|
|
@Serial
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* 主键 ID(雪花算法)
|
|
*/
|
|
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
|
@JsonSerialize(using = ToStringSerializer.class)
|
|
private Long id;
|
|
|
|
/**
|
|
* FAQ 问题
|
|
*/
|
|
@TableField("question")
|
|
private String question;
|
|
|
|
/**
|
|
* 标准答案
|
|
*/
|
|
@TableField("answer")
|
|
private String answer;
|
|
|
|
/**
|
|
* 相似问题列表,存储为 JSON 字符串如 '["问题1","问题2"]'
|
|
* 不使用 PostgresJsonTypeHandler,在 Service 层手动解析
|
|
*/
|
|
@TableField("similar_questions")
|
|
private String similarQuestions;
|
|
|
|
/**
|
|
* FAQ 分类(已废弃,保留向后兼容),改用 categoryId 引用 knowledge_category 表
|
|
*/
|
|
@TableField("category")
|
|
private String category;
|
|
|
|
/**
|
|
* 分类 ID,引用 knowledge_category.id(文档管理分类体系)
|
|
*/
|
|
@TableField("category_id")
|
|
@JsonSerialize(using = ToStringSerializer.class)
|
|
private Long categoryId;
|
|
|
|
/**
|
|
* 状态: ENABLED / DISABLED
|
|
*/
|
|
@TableField("status")
|
|
private String status;
|
|
|
|
/**
|
|
* 优先级,数值越大越优先
|
|
*/
|
|
@TableField("priority")
|
|
private Integer priority;
|
|
|
|
/**
|
|
* 命中次数统计
|
|
*/
|
|
@TableField("hit_count")
|
|
private Long hitCount;
|
|
|
|
/**
|
|
* 来源: manual / import / feedback_positive / feedback_negative
|
|
*/
|
|
@TableField("source")
|
|
private String source;
|
|
|
|
/**
|
|
* 由哪条反馈创建(可选,用于追溯)
|
|
*/
|
|
@TableField("created_from_feedback_id")
|
|
@JsonSerialize(using = ToStringSerializer.class)
|
|
private Long createdFromFeedbackId;
|
|
|
|
/**
|
|
* 创建时间
|
|
*/
|
|
@TableField("create_time")
|
|
private Date createTime;
|
|
|
|
/**
|
|
* 更新时间
|
|
*/
|
|
@TableField("update_time")
|
|
private Date updateTime;
|
|
|
|
/**
|
|
* 逻辑删除标记
|
|
*/
|
|
@TableLogic
|
|
@TableField("is_delete")
|
|
private boolean isDelete;
|
|
}
|