/**
 * 管理后台相关类型定义
 * 覆盖 Dashboard 入库日志记录、ConvertLogs 转换记录、分页参数等。
 */

/** 入库日志记录（Dashboard 表格数据源） */
export interface IngestLogRecord {
  doc_id: string
  title: string
  doc_number?: string
  issuing_org?: string
  status: string
  chunk_count?: number
  created_at: string
  error?: string
  task_id?: string
  file_path?: string
  acl_ids?: string[]
}

/** 文档删除结果 */
export interface DocumentDeleteResult {
  doc_id: string
  deleted_chunks: number
  deleted_meta: boolean
  deleted_guides: number
  deleted_graph_nodes: number
}

/** 批量删除结果 */
export interface BulkDeleteResult {
  requested?: number
  deleted_meta: number
  deleted_chunks: number
  deleted_guides: number
  deleted_graph_nodes: number
  errors?: string[]
}

/** 格式转换日志记录（ConvertLogs 表格数据源） */
export interface ConvertLogRecord {
  id: string | number
  originalFilename: string
  originalFormat: string
  targetFormat: string
  status: 'success' | 'failed'
  originalSize: number | null
  outputSize: number | null
  durationMs: number | null
  createdAt: string
  errorMessage?: string
}

/** Ant Design Table 分页变更参数 */
export interface TablePaginationParams {
  current: number
  pageSize: number
  total?: number
}
