package com.lingyue.extract.dto.config;

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

import java.util.Map;

/**
 * 转换配置
 * 
 * 描述如何对值进行转换
 * 
 * @author lingyue
 * @since 2026-01-22
 */
@Data
@Schema(description = "转换配置")
public class TransformConfig {
    
    @Schema(description = "转换类型: mapping-映射, format-格式化, concat-拼接, split-分割")
    private String type;
    
    @Schema(description = "映射表，如 {'是': 'true', '否': 'false'}")
    private Map<String, String> mapping;
    
    @Schema(description = "格式化模板，如 '{value}万元'")
    private String formatTemplate;
    
    @Schema(description = "拼接分隔符")
    private String concatSeparator;
    
    @Schema(description = "分割分隔符")
    private String splitSeparator;
    
    @Schema(description = "取分割后的第几个（0-based）")
    private Integer splitIndex;
    
    // ==================== 转换类型常量 ====================
    
    public static final String TYPE_MAPPING = "mapping";
    public static final String TYPE_FORMAT = "format";
    public static final String TYPE_CONCAT = "concat";
    public static final String TYPE_SPLIT = "split";
}
