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

import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.cy.guoyan.admin.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

import static com.cy.guoyan.admin.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - AI 知识库分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ChatKnowledgeDatasetPageReqVO extends PageParam {

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "Dify 平台返回的 Dataset ID，UUID 格式", example = "347")
    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 = "新增文档后，是否自动触发重新索引")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Boolean[] autoUpdate;

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

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

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

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

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

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

}