package com.yingpaipay.business.domain.dto;

import lombok.Data;

import java.util.List;

@Data
public class TextInPdfToMarkdownDTO {

    private Integer total_page_number;

    private Integer valid_page_number;

    private List<Page> pages;

    private List<Detail> detail;

    private Catalog catalog;

    private String markdown;

    private String excel_base64;


    @Data
    public static class Page {

        private String status;

        private Integer page_id;

        private Integer durations;

        private String image_id;

        private String origin_image_id;

        private String base64;

        private String origin_base64;

        private Integer width;

        private Integer height;

        private Integer angle;

        private List<Object> content;

        private List<Object> raw_ocr;

        private List<Object> structured;

    }

    @Data
    public static class Detail {

        private Integer page_id;

        private Integer paragraph_id;

        private Integer outline_level;

        private String text;

        private String type;

        private String image_url;

        private Integer content;

        private List<Object> position;

        private List<Object> origin_position;

        private String sub_type;

        private List<Object> tags;

        private CaptionId caption_id;

        private List<Cell> cells;

        private List<Object> split_section_page_ids;

        private List<Object> split_section_positions;

        private Stamp stamp;


        @Data
        public static class CaptionId {

            private Integer page_id;

            private Integer paragraph_id;

        }

        @Data
        public static class Cell {

            private Integer row;

            private Integer col;

            private Integer row_span;

            private Integer col_span;

            private List<Object> position;

            private List<Object> origin_position;

            private String text;

            private String type;

        }

        @Data
        public static class Stamp {

            private String value;

            private String stamp_shape;

            private String type;

            private String color;

        }

    }

    @Data
    public static class Catalog {

        private List<Toc> toc;

        @Data
        public static class Toc {

            private String sub_type;

            private String hierachy;

            private String title;

            private Integer page_id;

            private Integer paragraph_id;

            private List<Object> pos;

            private List<Object> pos_list;

        }

    }

}
