package com.cy.guoyan.admin.module.ai.controller.admin.chatknowledgedataset.vo;

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

import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;

@Schema(description = "管理后台 - AI 知识库 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ChatKnowledgeDatasetRespVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "22170")
    @ExcelProperty("主键")
    private Long id;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "Dify 平台返回的 Dataset ID，UUID 格式", requiredMode = Schema.RequiredMode.REQUIRED, example = "347")
    @ExcelProperty("Dify 平台返回的 Dataset ID，UUID 格式")
    private String difyDatasetId;

    @Schema(description = "知识库名称（由用户或 Dify 自动生成）", example = "张三")
    @ExcelProperty("知识库名称（由用户或 Dify 自动生成）")
    private String name;

    @Schema(description = "知识库描述（可选填）", example = "随便")
    @ExcelProperty("知识库描述（可选填）")
    private String description;

    @Schema(description = "索引策略，如“high_quality” 或“fast”")
    @ExcelProperty("索引策略，如“high_quality” 或“fast”")
    private String indexingTechnique;

    @Schema(description = "用于向量化的模型名称，如“openai-embedding-ada-002”")
    @ExcelProperty("用于向量化的模型名称，如“openai-embedding-ada-002”")
    private String embeddingModel;

    @Schema(description = "新增文档后，是否自动触发重新索引", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("新增文档后，是否自动触发重新索引")
    private Boolean autoUpdate;

    @Schema(description = "是否启用该知识库（查询时可过滤）", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("是否启用该知识库（查询时可过滤）")
    private Boolean enabled;

    @Schema(description = "默认访问权限：read / write / private")
    @ExcelProperty("默认访问权限：read / write / private")
    private String defaultPermission;

    @Schema(description = "已挂载在多少个应用上", requiredMode = Schema.RequiredMode.REQUIRED, example = "2893")
    @ExcelProperty("已挂载在多少个应用上")
    private Integer appCount;

    @Schema(description = "文档数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "2893")
    private Integer documentCount;

    @Schema(description = "Dify 服务端创建时间")
    @ExcelProperty("Dify 服务端创建时间")
    private LocalDateTime difyCreatedAt;

    @Schema(description = "Dify 服务端最后更新时间")
    @ExcelProperty("Dify 服务端最后更新时间")
    private LocalDateTime difyUpdatedAt;

    @Schema(description = "Dify 返回的完整元数据 JSON（便于调试和扩展）")
    @ExcelProperty("Dify 返回的完整元数据 JSON（便于调试和扩展）")
    private String metadataJson;

}