package com.zhengmeng.ocrplatform.recognition;

import java.math.BigDecimal;

public record OcrTextBlockSummaryItem(
        Long id,
        int runNo,
        int pageNo,
        String blockType,
        String textContent,
        BigDecimal confidence,
        Integer readingOrder,
        String sourceEngine
) {
    public static OcrTextBlockSummaryItem from(OcrTextBlockEntity entity) {
        return new OcrTextBlockSummaryItem(
                entity.getId(),
                entity.getRunNo(),
                entity.getPageNo(),
                entity.getBlockType(),
                entity.getTextContent(),
                entity.getConfidence(),
                entity.getReadingOrder(),
                entity.getSourceEngine()
        );
    }
}
