/**
 * @ProjectName: 智慧评标-主观分助手
 * @Package: com.zhpb.gdyd_zhpb_zgf.dto
 * @ClassName: QaHistoryResponse
 * @Description: QA历史记录响应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;

/**
 * QA历史记录响应DTO
 */
@Data
@Schema(description = "QA历史记录响应")
public class QaHistoryResponse {

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

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

    @Schema(description = "响应数据")
    private Object data;

    @Data
    @Schema(description = "会话历史数据")
    public static class SessionsData {

        @Schema(description = "会话列表")
        private List<SessionInfo> sessions;
    }

    @Data
    @Schema(description = "消息历史数据")
    public static class MessagesData {

        @Schema(description = "会话ID", example = "session-5e205312")
        private String sessionId;

        @Schema(description = "消息列表")
        private List<MessageInfo> messages;
    }

    @Data
    @Schema(description = "会话信息")
    public static class SessionInfo {

        @Schema(description = "会话ID", example = "session-5e205312")
        private String sessionId;

        @Schema(description = "开始时间", example = "2025-11-03T16:50:00")
        private String startTime;

        @Schema(description = "首次问题内容", example = "这个项目的预算有多少？")
        private String firstQuery;

        @Schema(description = "当前会话涉及的文件ID列表")
        private List<String> fileIds;

        @Schema(description = "当前会话涉及的文件名列表")
        private List<String> fileNames;

        @Schema(description = "当前会话涉及的供应商名称列表")
        private List<String> supplierNames;

        @Schema(description = "当前会话涉及的供应商ID列表")
        private List<String> supplierIds;
    }

    @Data
    @Schema(description = "消息信息")
    public static class MessageInfo {

        @Schema(description = "消息ID", example = "msg-4e529b65")
        private String messageId;

        @Schema(description = "发送者", example = "user", allowableValues = {"user", "ai"})
        private String sender;

        @Schema(description = "消息内容", example = "这个项目的预算有多少？")
        private String content;

        @Schema(description = "来源信息")
        private Object sources;

        @Schema(description = "时间戳", example = "2025-11-03T16:50:00")
        private String timestamp;

        @Schema(description = "引用文件ID列表")
        private List<String> fileIds;
    }
}
