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

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import top.continew.starter.data.core.annotation.Query;
import top.continew.starter.data.core.enums.QueryType;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 向量存储配置查询条件
 *
 * @author semi
 * @since 2025/05/26 17:28
 */
@Data
@Schema(description = "向量存储配置查询条件")
public class EmbedStoreQuery implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 存储配置名称(唯一)
     */
    @Schema(description = "存储配置名称(唯一)")
    @Query(type = QueryType.EQ)
    private String name;

    /**
     * 供应商:milvus/pgvector/reids
     */
    @Schema(description = "供应商:milvus/pgvector/reids")
    @Query(type = QueryType.EQ)
    private String provider;

    /**
     * 连接端点 {"host":"192.168.1.10","port":19530}
     */
    @Schema(description = "连接端点 ")
    @Query(type = QueryType.EQ)
    private String endpoints;

    /**
     * 认证配置 {
     * "username":"admin",
     * "password":"****"
     * }
     */
    @Schema(description = "认证配置 ")
    @Query(type = QueryType.EQ)
    private String authConfig;

    /**
     * 数据库配置 {"database":"pavis_admin","table":"sys_user"}
     */
    @Schema(description = "数据库配置 {\"database\":\"pavis_admin\",\"table\":\"sys_user\"}")
    @Query(type = QueryType.EQ)
    private String databaseConfig;

    /**
     * 向量配置 {
     * "dimension":768,
     * "metric_type":"L2",
     * "index_type":"HNSW",
     * "max_conn":16
     * }
     */
    @Schema(description = "向量配置 ")
    @Query(type = QueryType.EQ)
    private String vectorConfig;

    /**
     * 创建人
     */
    @Schema(description = "创建人")
    @Query(type = QueryType.EQ)
    private Long createUser;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @Query(type = QueryType.EQ)
    private LocalDateTime createTime;
}