/**
 * @ProjectName: 智慧评标-主观分助手
 * @Package: com.zhpb.gdyd_zhpb_zgf.dto
 * @ClassName: ComparisonResponse
 * @Description: 对比分析响应DTO
 * @Author: 张志锋
 * @Date: 2025-11-04
 * @Version: 1.0
 * @Copyright: © 2025 智慧评标-主观分助手
 */
package com.zhpb.gdyd_zhpb_zgf.dto;

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

import java.util.List;

/**
 * 对比分析响应DTO
 */
public class ComparisonResponse {

    /**
     * 获取供应商数据响应
     */
    @Schema(description = "获取供应商数据响应")
    public static class VendorsData {
        @Schema(description = "供应商列表")
        private List<VendorInfo> vendors;

        public List<VendorInfo> getVendors() {
            return vendors;
        }

        public void setVendors(List<VendorInfo> vendors) {
            this.vendors = vendors;
        }
    }

    /**
     * 供应商信息
     */
    @Schema(description = "供应商信息")
    public static class VendorInfo {
        @Schema(description = "供应商ID", example = "supplier-001")
        private String vendorId;

        @Schema(description = "供应商名称", example = "彩讯科技股份有限公司")
        private String vendorName;

        @Schema(description = "供应商类型", example = "技术服务商")
        private String vendorType;

        @Schema(description = "文件列表")
        private List<FileInfo> files;

        public String getVendorId() {
            return vendorId;
        }

        public void setVendorId(String vendorId) {
            this.vendorId = vendorId;
        }

        public String getVendorName() {
            return vendorName;
        }

        public void setVendorName(String vendorName) {
            this.vendorName = vendorName;
        }

        public String getVendorType() {
            return vendorType;
        }

        public void setVendorType(String vendorType) {
            this.vendorType = vendorType;
        }

        public List<FileInfo> getFiles() {
            return files;
        }

        public void setFiles(List<FileInfo> files) {
            this.files = files;
        }
    }

    /**
     * 文件信息
     */
    @Schema(description = "文件信息")
    public static class FileInfo {
        @Schema(description = "文件ID", example = "file-001")
        private String fileId;

        @Schema(description = "文件名称", example = "技术方案.pdf")
        private String fileName;

        @Schema(description = "文件类型", example = "技术文件")
        private String fileType;

        @Schema(description = "文件大小(字节)", example = "2048576")
        private Long fileSize;

        public String getFileId() {
            return fileId;
        }

        public void setFileId(String fileId) {
            this.fileId = fileId;
        }

        public String getFileName() {
            return fileName;
        }

        public void setFileName(String fileName) {
            this.fileName = fileName;
        }

        public String getFileType() {
            return fileType;
        }

        public void setFileType(String fileType) {
            this.fileType = fileType;
        }

        public Long getFileSize() {
            return fileSize;
        }

        public void setFileSize(Long fileSize) {
            this.fileSize = fileSize;
        }
    }

    /**
     * 启动对比任务响应
     */
    @Schema(description = "启动对比任务响应")
    public static class StartTaskData {
        @Schema(description = "任务ID", example = "task-001")
        private String taskId;

        @Schema(description = "任务状态", example = "pending:待处理")
        private String status;

        @Schema(description = "创建时间", example = "2025-11-04T12:00:00Z")
        private String createdTime;

        public String getTaskId() {
            return taskId;
        }

        public void setTaskId(String taskId) {
            this.taskId = taskId;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getCreatedTime() {
            return createdTime;
        }

        public void setCreatedTime(String createdTime) {
            this.createdTime = createdTime;
        }
    }

    /**
     * 对比任务历史响应
     */
    @Schema(description = "对比任务历史响应")
    public static class TaskHistoryData {
        @Schema(description = "任务列表")
        private List<TaskInfo> tasks;

        public List<TaskInfo> getTasks() {
            return tasks;
        }

        public void setTasks(List<TaskInfo> tasks) {
            this.tasks = tasks;
        }
    }

    /**
     * 任务信息
     */
    @Schema(description = "任务信息")
    public static class TaskInfo {
        @Schema(description = "任务ID", example = "task-001")
        private String taskId;

        @Schema(description = "任务名称", example = "对比任务1")
        private String taskName;

        @Schema(description = "项目ID", example = "project-001")
        private String projectId;

        @Schema(description = "用户ID", example = "user-001")
        private String userId;

        @Schema(description = "任务状态", example = "completed:已完成", allowableValues = {"pending:待处理", "processing:处理中", "completed:已完成", "failed:失败"})
        private String status;

        @Schema(description = "供应商数量", example = "3")
        private Integer vendorCount;

        @Schema(description = "对比维度数量", example = "5")
        private Integer dimensionCount;

        @Schema(description = "创建时间", example = "2025-11-04T12:00:00Z")
        private String createdTime;

        @Schema(description = "完成时间", example = "2025-11-04T12:05:00Z")
        private String completedTime;

        @Schema(description = "对比维度列表", example = "[\"技术能力\", \"商务条款\", \"报价分析\"]")
        private List<String> dimensions;

        @Schema(description = "供应商列表", example = "[\"供应商A\", \"供应商B\", \"供应商C\"]")
        private List<String> vendors;

        @Schema(description = "任务耗时（秒）", example = "120")
        private Long time;

        public String getTaskId() {
            return taskId;
        }

        public void setTaskId(String taskId) {
            this.taskId = taskId;
        }

        public String getProjectId() {
            return projectId;
        }

        public void setProjectId(String projectId) {
            this.projectId = projectId;
        }

        public String getUserId() {
            return userId;
        }

        public void setUserId(String userId) {
            this.userId = userId;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public Integer getVendorCount() {
            return vendorCount;
        }

        public void setVendorCount(Integer vendorCount) {
            this.vendorCount = vendorCount;
        }

        public Integer getDimensionCount() {
            return dimensionCount;
        }

        public void setDimensionCount(Integer dimensionCount) {
            this.dimensionCount = dimensionCount;
        }

        public String getCreatedTime() {
            return createdTime;
        }

        public void setCreatedTime(String createdTime) {
            this.createdTime = createdTime;
        }

        public String getCompletedTime() {
            return completedTime;
        }

        public void setCompletedTime(String completedTime) {
            this.completedTime = completedTime;
        }

        public List<String> getDimensions() {
            return dimensions;
        }

        public void setDimensions(List<String> dimensions) {
            this.dimensions = dimensions;
        }

        public List<String> getVendors() {
            return vendors;
        }

        public void setVendors(List<String> vendors) {
            this.vendors = vendors;
        }

        public Long getTime() {
            return time;
        }

        public void setTime(Long time) {
            this.time = time;
        }

        public String getTaskName() {
            return taskName;
        }

        public void setTaskName(String taskName) {
            this.taskName = taskName;
        }
    }

    /**
     * 对比结果响应
     */
    @Schema(description = "对比结果响应")
    public static class ComparisonResultData {
        @Schema(description = "任务ID", example = "task-001")
        private String taskId;

        @Schema(description = "任务状态", example = "completed:已完成")
        private String status;

        @Schema(description = "对比结果矩阵")
        private List<ResultMatrixItem> resultMatrix;

        public String getTaskId() {
            return taskId;
        }

        public void setTaskId(String taskId) {
            this.taskId = taskId;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public List<ResultMatrixItem> getResultMatrix() {
            return resultMatrix;
        }

        public void setResultMatrix(List<ResultMatrixItem> resultMatrix) {
            this.resultMatrix = resultMatrix;
        }
    }

    /**
     * 结果矩阵项
     */
    @Schema(description = "结果矩阵项")
    public static class ResultMatrixItem {
        @Schema(description = "对比维度", example = "价格")
        private String dimension;

        @Schema(description = "维度类型", example = "price")
        private String dimensionType;

        @Schema(description = "供应商对比结果")
        private List<VendorComparison> comparisons;

        public String getDimension() {
            return dimension;
        }

        public void setDimension(String dimension) {
            this.dimension = dimension;
        }

        public String getDimensionType() {
            return dimensionType;
        }

        public void setDimensionType(String dimensionType) {
            this.dimensionType = dimensionType;
        }

        public List<VendorComparison> getComparisons() {
            return comparisons;
        }

        public void setComparisons(List<VendorComparison> comparisons) {
            this.comparisons = comparisons;
        }
    }

    /**
     * 供应商对比结果
     */
    @Schema(description = "供应商对比结果")
    public static class VendorComparison {
        @Schema(description = "供应商ID", example = "supplier-001")
        private String vendorId;

        @Schema(description = "供应商名称", example = "彩讯科技股份有限公司")
        private String vendorName;

        @Schema(description = "对比总结", example = "该供应商在价格方面具有竞争力...")
        private String summary;

        @Schema(description = "相似度分数列表")
        private List<Double> similarityScores;

        @Schema(description = "相关文件信息")
        private List<FileInfo> fileInfo;

        public String getVendorId() {
            return vendorId;
        }

        public void setVendorId(String vendorId) {
            this.vendorId = vendorId;
        }

        public String getVendorName() {
            return vendorName;
        }

        public void setVendorName(String vendorName) {
            this.vendorName = vendorName;
        }

        public String getSummary() {
            return summary;
        }

        public void setSummary(String summary) {
            this.summary = summary;
        }

        public List<Double> getSimilarityScores() {
            return similarityScores;
        }

        public void setSimilarityScores(List<Double> similarityScores) {
            this.similarityScores = similarityScores;
        }

        public List<FileInfo> getFileInfo() {
            return fileInfo;
        }

        public void setFileInfo(List<FileInfo> fileInfo) {
            this.fileInfo = fileInfo;
        }
    }
}
