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;

@Schema(description = "管理后台 - AI 知识库新增/修改 Request VO")
@Data
public class ChatKnowledgeDatasetSaveReqVO {

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

    @Schema(description = "Dify 平台返回的 Dataset ID，UUID 格式", requiredMode = Schema.RequiredMode.REQUIRED, example = "347")
//    @NotEmpty(message = "Dify 平台返回的 Dataset ID，UUID 格式不能为空")
    private String difyDatasetId;

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

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

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

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

    @Schema(description = "新增文档后，是否自动触发重新索引", requiredMode = Schema.RequiredMode.REQUIRED)
//    @NotNull(message = "新增文档后，是否自动触发重新索引不能为空")
    private Boolean autoUpdate;

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

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

    @Schema(description = "")
    private String query;

    @Schema(description = "已挂载在多少个应用上", requiredMode = Schema.RequiredMode.REQUIRED, example = "2893")
//    @NotNull(message = "已挂载在多少个应用上不能为空")
    private Integer appCount;

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

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

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

}