from pydantic import BaseModel, Field
from typing import Optional, Dict, Any, List, Literal
from uuid import UUID
from datetime import datetime

class LastMessage(BaseModel):
    message_id: int
    message_type: List[Literal["text", "media", "circle", "voice", "system", "forward", "reply", "poll"]]
    context: str
    created_at: datetime

class PrivateChatListItem(BaseModel):
    chat_name: Optional[str]
    chat_type: Literal["self", "private"]
    chat_id: UUID
    chat_data: Optional[Dict[str, Any]] = None
    companion_id: Optional[UUID] = None
    companion_data: Optional[Dict[str, Any]] = None  # Типизируй как нужно
    last_message: Optional[LastMessage] = None
    created_at: datetime
