package com.lingyue.extract.dto.config;

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

/**
 * 变量在文档中的位置
 * 
 * 描述变量在示例报告中的精确位置
 * 
 * @author lingyue
 * @since 2026-01-23
 */
@Data
@Schema(description = "变量位置配置")
public class VariableLocation {
    
    @Schema(description = "DocumentElement ID")
    private String elementId;
    
    @Schema(description = "位置类型: text-文本, table_cell-表格单元格, paragraph-段落")
    private String type;
    
    // ==================== 文本定位 ====================
    
    @Schema(description = "文本起始偏移量")
    private Integer startOffset;
    
    @Schema(description = "文本结束偏移量")
    private Integer endOffset;
    
    // ==================== 表格定位 ====================
    
    @Schema(description = "表格行索引（0-based）")
    private Integer rowIndex;
    
    @Schema(description = "表格列索引（0-based）")
    private Integer colIndex;
    
    // ==================== 位置类型常量 ====================
    
    public static final String TYPE_TEXT = "text";
    public static final String TYPE_TABLE_CELL = "table_cell";
    public static final String TYPE_PARAGRAPH = "paragraph";
}
