package com.pavis.admin.aigc.model.resp;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.pavis.admin.common.model.resp.BaseDetailResp;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;

/**
 * 智能文档详情信息
 *
 * @author semi
 * @since 2025/05/26 17:28
 */
@Data
@ExcelIgnoreUnannotated
@Schema(description = "智能文档详情信息")
public class DocDetailResp extends BaseDetailResp {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 所属知识库ID
     */
    @Schema(description = "所属知识库ID")
    @ExcelProperty(value = "所属知识库ID")
    private Long knowledgeId;

    /**
     * 文档名称
     */
    @Schema(description = "文档名称")
    @ExcelProperty(value = "文档名称")
    private String name;

    /**
     * 文件类型
     */
    @Schema(description = "文件类型")
    @ExcelProperty(value = "文件类型")
    private String fileType;

    /**
     * MIME类型
     */
    @Schema(description = "MIME类型")
    @ExcelProperty(value = "MIME类型")
    private String mimeType;

    /**
     * 文件编码
     */
    @Schema(description = "文件编码")
    @ExcelProperty(value = "文件编码")
    private String fileEncoding;

    /**
     * 文件哈希
     */
    @Schema(description = "文件哈希")
    @ExcelProperty(value = "文件哈希")
    private String fileHash;

    /**
     * 文件大小
     */
    @Schema(description = "文件大小")
    @ExcelProperty(value = "文件大小")
    private Long fileSize;

    /**
     * 存储路径
     */
    @Schema(description = "存储路径")
    @ExcelProperty(value = "存储路径")
    private String storagePath;

    /**
     * 存储区域
     */
    @Schema(description = "存储区域")
    @ExcelProperty(value = "存储区域")
    private String storageRegion;

    /**
     * 解析后文本
     */
    @Schema(description = "解析后文本")
    @ExcelProperty(value = "解析后文本")
    private String parsedContent;

    /**
     * 原始文件内容
     */
    @Schema(description = "原始文件内容")
    @ExcelProperty(value = "原始文件内容")
    private String originalContent;

    /**
     * 元数据 {
     * "author": "张三",
     * "pages": 42,
     * "language": "zh",
     * "created_time": "2023-01-01"
     * }
     */
    @Schema(description = "元数据")
    @ExcelProperty(value = "元数据")
    private String metadata;

    /**
     * 处理状态:uploaded/parsing/parsed/failed
     */
    @Schema(description = "处理状态:uploaded/parsing/parsed/failed")
    @ExcelProperty(value = "处理状态:uploaded/parsing/parsed/failed")
    private String processingStatus;

    /**
     * 切片配置 {
     * "strategy":"auto",
     * "chunk_size":1000,
     * "overlap":50
     * }
     */
    @Schema(description = "切片配置")
    @ExcelProperty(value = "切片配置 ")
    private String chunkConfig;

    /**
     * 切片详情 [
     * {"id":1,"content":"...","vectors":32},
     * {"id":2,"content":"...","vectors":28}
     * ]
     */
    @Schema(description = "切片详情")

    @ExcelProperty(value = "切片详情")
    private String chunkDetails;

    /**
     * 向量化状态:pending/processing/completed/failed
     */
    @Schema(description = "向量化状态:pending/processing/completed/failed")
    @ExcelProperty(value = "向量化状态:pending/processing/completed/failed")
    private String vectorStatus;

    /**
     * 错误日志
     */
    @Schema(description = "错误日志")
    @ExcelProperty(value = "错误日志")
    private String errorLog;

    /**
     * 重试次数
     */
    @Schema(description = "重试次数")
    @ExcelProperty(value = "重试次数")
    private Integer retryCount;

    /**
     * 敏感内容标记
     */
    @Schema(description = "敏感内容标记")
    @ExcelProperty(value = "敏感内容标记")
    private Boolean isSensitive;

    /**
     * 文档版本
     */
    @Schema(description = "文档版本")
    @ExcelProperty(value = "文档版本")
    private Integer version;
}