package com.pavis.admin.aigc.model.resp;

import lombok.Data;

import io.swagger.v3.oas.annotations.media.Schema;

import com.pavis.admin.common.model.resp.BaseResp;

import java.io.Serial;
import java.time.*;
import java.math.BigDecimal;

/**
 * AIGC知识库信息
 *
 * @author semi
 * @since 2025/05/26 17:28
 */
@Data
@Schema(description = "AIGC知识库信息")
public class KnowledgeResp extends BaseResp {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 知识库名称(唯一)
     */
    @Schema(description = "知识库名称(唯一)")
    private String name;

    /**
     * 类型:document/image/audio/video/multi
     */
    @Schema(description = "类型:document/image/audio/video/multi")
    private String type;

    /**
     * 允许的文件类型
     */
    @Schema(description = "允许的文件类型")
    private String fileType;

    /**
     *
     */
    @Schema(description = "")
    private String embedConfig;

    /**
     * 关联向量模型ID
     */
    @Schema(description = "关联向量模型ID")
    private Long embedModelId;

    /**
     * 关联向量存储ID
     */
    @Schema(description = "关联向量存储ID")
    private Long embedStoreId;

    /**
     * 切片策略:fixed/semantic/hybrid
     */
    @Schema(description = "切片策略:fixed/semantic/hybrid")
    private String chunkStrategy;

    /**
     * 切片大小
     */
    @Schema(description = "切片大小")
    private Integer chunkSize;

    /**
     * 切片重叠大小
     */
    @Schema(description = "切片重叠大小")
    private Integer chunkOverlap;

    /**
     * 最后向量化同步时间
     */
    @Schema(description = "最后向量化同步时间")
    private LocalDateTime lastSyncTime;

    /**
     * 知识库大小(字节)
     */
    @Schema(description = "知识库大小(字节)")
    private Long storageSize;

    /**
     * 包含文件数
     */
    @Schema(description = "包含文件数")
    private Integer fileCount;

    /**
     * 存储参数 {
     * "bucket":"aigc-kb",
     * "region":"ap-northeast-1",
     * "prefix":"/knowledge/"
     * }
     */
    @Schema(description = "存储参数")
    private String storageConfig;

    /**
     * 状态:0停用 1启用 2同步中
     */
    @Schema(description = "状态:0停用 1启用 2同步中")
    private Boolean status;

    /**
     * 被检索次数
     */
    @Schema(description = "被检索次数")
    private Long hitCount;

    /**
     * 平均检索相关度
     */
    @Schema(description = "平均检索相关度")
    private BigDecimal avgRelevance;

    /**
     * 修改人
     */
    @Schema(description = "修改人")
    private Long updateUser;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    private LocalDateTime updateTime;

    private EmbedStoreResp embedStore;

    private ModelResp embedModel;


    /**
     * 知识库描述
     */
    @Schema(description = "知识库描述")
    private String knowDescribe;
}