package com.seer.teach.common.enums.llm;

/**
 * AI平台枚举
 *
 * @author System
 * @since 2025-10-30
 */
public enum OcrLableEnum {

    ABSTRACT("abstract", "摘要"),

    ALGORITHM("algorithm", "算法"),

    ASIDE_TEXT("asideText", "旁注文字"),

    CHART("chart", "图表"),

    CONTENT("content", "内容"),

    DISPLAY_FORMULA("displayFormula", "展示公式"),

    DOC_TITLE("docTitle", "文档标题"),

    FIGURE_TITLE("figureTitle", "图标题"),

    FOOTER("footer", "页脚"),

    FOOTER_IMAGE("footerImage", "页脚图片"),

    FOOTNOTE("footnote", "脚注"),

    FORMULA_NUMBER("formulaNumber", "公式编号"),

    HEADER("header", "页眉"),

    HEADER_IMAGE("headerImage", "页眉图片"),

    IMAGE("image", "图片"),

    INLINE_FORMULA("inlineFormula", "行内公式"),

    NUMBER("number", "编号"),

    PARAGRAPH_TITLE("paragraphTitle", "段落标题"),

    REFERENCE("reference", "参考文献"),

    REFERENCE_CONTENT("referenceContent", "参考文献内容"),

    SEAL("seal", "印章"),

    TABLE("table", "表格"),

    TEXT("text", "正文文本"),

    VERTICAL_TEXT("verticalText", "纵向文字"),

    VISION_FOOTNOTE("visionFootnote", "视觉脚注"),

    QUESTION_BOX("questionBox","题目框框");

    private final String code;

    private final String description;

    OcrLableEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    /**
     * 根据 code 获取枚举
     */
    public static OcrLableEnum fromCode(String code) {
        for (OcrLableEnum label : values()) {
            if (label.code.equals(code)) {
                return label;
            }
        }
        return null;
    }
}