package com.custom.webui.entity;
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
import lombok.Data;
|
|
import java.time.LocalDateTime;
|
|
/**
|
* RAG 文件与向量集合映射实体,对应表 {@code rag_collection}。
|
*
|
* <p>向量数据本身存放在 Chroma,本表只保存「文件 -> 集合名」的映射与入库状态,
|
* 保证业务数据与向量数据分离(文档核心约束)。
|
*/
|
@Data
|
@TableName("rag_collection")
|
public class RagCollection {
|
|
@TableId(type = IdType.AUTO)
|
private Long id;
|
|
private Long userId;
|
|
/** 关联 upload_file.id */
|
private Long fileId;
|
|
/** Chroma / Qdrant 中的集合名称 */
|
private String collectionName;
|
|
/** 入库分块数量 */
|
private Integer chunkCount;
|
|
/** pending / ready / failed */
|
private String status;
|
|
/** 失败原因或状态说明 */
|
private String message;
|
|
private LocalDateTime createdAt;
|
|
public static final String STATUS_PENDING = "pending";
|
public static final String STATUS_READY = "ready";
|
public static final String STATUS_FAILED = "failed";
|
}
|