from typing import List, Optional

from pydantic import BaseModel


class DocumentInfo(BaseModel):
    document_id: str
    filename: str
    chunk_count: int
    upload_date: str


class ChunkInfo(BaseModel):
    chunk_id: str
    chunk_index: int
    content_summary: str
    page_number: Optional[int] = None
    chunk_file_path: Optional[str] = None


class DocumentListResponse(BaseModel):
    documents: List[DocumentInfo]
    total_documents: int
    total_chunks: int


class DeleteResponse(BaseModel):
    deleted: bool
    message: str
