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

import lombok.Data;

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

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;

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

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

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

    @Serial
    private static final long serialVersionUID = 1L;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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