package com.lingyue.graph.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 创建数据源请求
 * 
 * @author lingyue
 * @since 2026-01-21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "创建数据源请求")
public class CreateDataSourceRequest {
    
    @NotBlank(message = "数据源名称不能为空")
    @Schema(description = "数据源名称", required = true)
    private String name;
    
    @NotBlank(message = "数据源类型不能为空")
    @Schema(description = "数据源类型", example = "text/table/image", required = true)
    private String type;
    
    @Schema(description = "文档ID")
    private String documentId;
    
    @Schema(description = "来源类型", example = "file/manual/rule_result")
    private String sourceType = "manual";
    
    @Schema(description = "值类型", example = "text/image/table/mixed")
    private String valueType = "text";
    
    @Schema(description = "聚合方式", example = "first/last/concat/sum/avg/list")
    private String aggregateType = "first";
    
    @Schema(description = "聚合分隔符")
    private String separator = "";
    
    @Schema(description = "节点引用列表")
    private NodeRefs nodeIds;
    
    @Schema(description = "数据源配置")
    private Object config;
    
    @Schema(description = "元数据")
    private Object metadata;
}
