昨天 ad346a7e1f1c35b09a5550c1b60cebe68f0619bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package com.ruoyi.approve.pojo;
 
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
 
import java.io.Serializable;
import java.time.LocalDateTime;
 
/**
 * 知识库文件向量记录表
 * knowledge_base_vector
 */
@Data
@TableName("knowledge_base_vector")
@Schema(description = "知识库文件向量记录")
public class KnowledgeBaseVector implements Serializable {
    private static final long serialVersionUID = 1L;
 
    @TableId(type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long id;
 
    @Schema(description = "关联知识库ID")
    private Long knowledgeBaseId;
 
    @Schema(description = "关联文件blob ID")
    private Long storageBlobId;
 
    @Schema(description = "文件名称")
    private String fileName;
 
    @Schema(description = "文件类型(docx/pdf/xlsx/txt等)")
    private String fileType;
 
    @Schema(description = "向量化状态: 0-待处理, 1-处理中, 2-已完成, 3-失败")
    private Integer vectorStatus;
 
    @Schema(description = "向量化失败原因")
    private String vectorError;
 
    @Schema(description = "切片数量")
    private Integer chunkCount;
 
    @Schema(description = "向量命名空间")
    private String namespace;
 
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
 
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建人")
    private Integer createUser;
 
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
 
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新人")
    private Integer updateUser;
 
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "租户ID")
    private Long tenantId;
 
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "部门ID")
    private Long deptId;
 
    // 向量化状态常量
    public static final int STATUS_PENDING = 0;
    public static final int STATUS_PROCESSING = 1;
    public static final int STATUS_COMPLETED = 2;
    public static final int STATUS_FAILED = 3;
}