package org.xyzh.ai.client.dto;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;

import java.util.List;

/**
 * @description Dify文档列表响应
 * @filename DocumentListResponse.java
 * @author AI Assistant
 * @copyright xyzh
 * @since 2025-11-07
 */
@Data
public class DocumentListResponse {
    
    private List<Document> data;
    
    @JSONField(name = "has_more")
    private Boolean hasMore;
    
    private Integer limit;
    
    private Integer total;
    
    private Integer page;
    
    /**
     * 文档信息
     */
    @Data
    public static class Document {
        private String id;
        
        private Integer position;
        
        @JSONField(name = "data_source_type")
        private String dataSourceType;
        
        @JSONField(name = "data_source_info")
        private DataSourceInfo dataSourceInfo;
        
        @JSONField(name = "dataset_process_rule_id")
        private String datasetProcessRuleId;
        
        private String name;
        
        @JSONField(name = "created_from")
        private String createdFrom;
        
        @JSONField(name = "created_by")
        private String createdBy;
        
        @JSONField(name = "created_at")
        private Long createdAt;
        
        private Integer tokens;
        
        @JSONField(name = "indexing_status")
        private String indexingStatus;
        
        private String error;
        
        private Boolean enabled;
        
        @JSONField(name = "disabled_at")
        private Long disabledAt;
        
        @JSONField(name = "disabled_by")
        private String disabledBy;
        
        private Boolean archived;
        
        @JSONField(name = "display_status")
        private String displayStatus;
        
        @JSONField(name = "word_count")
        private Integer wordCount;
        
        @JSONField(name = "hit_count")
        private Integer hitCount;
        
        @JSONField(name = "doc_form")
        private String docForm;
    }
    
    /**
     * 数据源信息
     */
    @Data
    public static class DataSourceInfo {
        @JSONField(name = "upload_file_id")
        private String uploadFileId;
    }
}
