/**
 * @ProjectName: 智慧评标-主观分助手
 * @Package: com.zhpb.gdyd_zhpb_zgf.dto
 * @ClassName: SummaryResponse
 * @Description: 总结相关响应DTO
 * @Author: 张志锋
 * @Date: 2025-11-03
 * @Version: 1.0
 * @Copyright: © 2025 智慧评标-主观分助手
 */
package com.zhpb.gdyd_zhpb_zgf.dto;

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

import java.util.List;

/**
 * 总结相关响应DTO
 */
public class SummaryResponse {

    @Data
    @Schema(description = "目录响应")
    public static class DirectoryResponse {

        @Schema(description = "响应状态码，0表示成功", example = "0")
        private Integer code;

        @Schema(description = "响应消息", example = "Success")
        private String message;

        @Schema(description = "目录数据")
        private DirectoryData data;
    }

    @Data
    @Schema(description = "目录数据")
    public static class DirectoryData {

        @Schema(description = "文件ID", example = "9e607a37-ab87-4e02-8b42-125270d6bf58")
        private String fileId;

        @Schema(description = "目录结构")
        private List<DirectoryItem> directory;
    }

    @Data
    @Schema(description = "目录项")
    public static class DirectoryItem {

        @Schema(description = "章节ID", example = "chap-0")
        private String chapterId;

        @Schema(description = "章节标题", example = "1、技术规范文件应答")
        private String title;

        @Schema(description = "页码信息", example = "1")
        private String page;

        @Schema(description = "起始页码", example = "1")
        private Integer startPage;

        @Schema(description = "结束页码", example = "1")
        private Integer endPage;

        @Schema(description = "子章节列表")
        private List<DirectoryItem> children;
    }

    @Data
    @Schema(description = "章节总结响应")
    public static class ChapterSummaryResponse {

        @Schema(description = "响应状态码，0表示成功", example = "0")
        private Integer code;

        @Schema(description = "响应消息", example = "Success")
        private String message;

        @Schema(description = "章节总结数据")
        private ChapterSummaryData data;
    }

    @Data
    @Schema(description = "章节总结数据")
    public static class ChapterSummaryData {

        @Schema(description = "文件ID", example = "9e607a37-ab87-4e02-8b42-125270d6bf58")
        private String fileId;

        @Schema(description = "章节ID", example = "chap-0")
        private String chapterId;

        @Schema(description = "章节总结", example = "本章节主要介绍了...")
        private String summary;

        @Schema(description = "来源信息")
        private List<SourceInfo> sources;
    }

    @Data
    @Schema(description = "来源信息")
    public static class SourceInfo {

        @Schema(description = "页码", example = "1")
        private String page;

        @Schema(description = "文件ID", example = "9e607a37-ab87-4e02-8b42-125270d6bf58")
        private String fileId;

        @Schema(description = "内容片段", example = "具体内容...")
        private String snippet;

        @Schema(description = "章节ID", example = "chap-0")
        private String chapterId;

        @Schema(description = "起始页码", example = "1")
        private Integer startPage;

        @Schema(description = "结束页码", example = "1")
        private Integer endPage;
    }
}
