package com.lingyue.extract.dto.config;

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

import java.util.List;

/**
 * AI字段提取配置
 * 
 * 用于 extractType = "ai_extract" 的规则
 * 使用AI从内容中提取特定字段
 * 
 * @author lingyue
 * @since 2026-01-22
 */
@Data
@Schema(description = "AI字段提取配置")
public class AIExtractConfig {
    
    @Schema(description = "提取目标描述，如'工程名称'、'建设日期'")
    private String targetDescription;
    
    @Schema(description = "字段类型: text-文本, date-日期, number-数字, amount-金额, list-列表")
    private String fieldType;
    
    @Schema(description = "预期格式，如'YYYY-MM-DD'、'XX万元'")
    private String expectedFormat;
    
    @Schema(description = "示例值列表，帮助AI理解")
    private List<String> examples;
    
    @Schema(description = "额外的提取说明")
    private String additionalInstructions;
    
    @Schema(description = "使用的AI模型（可选，默认使用项目配置）")
    private String modelName;
    
    @Schema(description = "温度参数（控制随机性，0-1）")
    private Double temperature;
    
    // ==================== 字段类型常量 ====================
    
    public static final String FIELD_TYPE_TEXT = "text";
    public static final String FIELD_TYPE_DATE = "date";
    public static final String FIELD_TYPE_NUMBER = "number";
    public static final String FIELD_TYPE_AMOUNT = "amount";
    public static final String FIELD_TYPE_LIST = "list";
}
