package com.lingyue.extract.dto.config;

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

import java.util.List;

/**
 * 定位配置
 * 
 * 描述如何在文档中定位内容
 * 
 * @author lingyue
 * @since 2026-01-22
 */
@Data
@Schema(description = "定位配置")
public class LocationConfig {
    
    @Schema(description = "定位类型: page-按页码, chapter-按章节, element-按元素ID, cell-按单元格")
    private String type;
    
    // ==================== 按页码定位 ====================
    
    @Schema(description = "起始页码")
    private Integer pageStart;
    
    @Schema(description = "结束页码")
    private Integer pageEnd;
    
    @Schema(description = "段落关键词过滤")
    private String paragraphKeyword;
    
    // ==================== 按章节定位 ====================
    
    @Schema(description = "章节路径，如 ['3', '5', '3', '3'] 表示 3.5.3.3")
    private List<String> chapterPath;
    
    @Schema(description = "章节标题关键词")
    private String chapterTitle;
    
    // ==================== 按元素ID定位 ====================
    
    @Schema(description = "元素ID列表")
    private List<String> elementIds;
    
    // ==================== 按单元格定位（Excel） ====================
    
    @Schema(description = "Sheet名称")
    private String sheetName;
    
    @Schema(description = "单元格引用，如 'A1:C10' 或 '1.5.1'")
    private String cellRef;
    
    // ==================== 定位类型常量 ====================
    
    public static final String TYPE_PAGE = "page";
    public static final String TYPE_CHAPTER = "chapter";
    public static final String TYPE_ELEMENT = "element";
    public static final String TYPE_CELL = "cell";
}
