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


class UserSearchResult(BaseModel):
    user_id: UUID
    login: str
    full_name: Optional[str] = None
    custom_name: Optional[str] = None
    created_at: datetime = Field(..., description="Дата регистрации")
    profile: Optional[Any] = Field(None, description="Модель как у /profile/{user_id}")


class SearchData(BaseModel):
    users: List[UserSearchResult]
    groups: List[Any] = []
    channels: List[Any] = []
    messages: List[Any] = []


class SearchResponse(BaseModel):
    status: str
    data: SearchData

