"""Публичные ready-метаданные lab4; приватный object_key не выдаётся клиенту.""" from datetime import datetime from typing import Literal from uuid import UUID from pydantic import Field from app.schemas.base import Base class Attachment(Base): chat_id: UUID owner_id: UUID filename: str = Field(min_length=1, max_length=255) content_type: Literal["image/png", "image/jpeg"] size_bytes: int = Field(ge=1, le=10_485_760) sha256: str = Field(pattern=r"^[a-f0-9]{64}$") status: Literal["ready"] = "ready" variants: list[object] = Field(default_factory=list, max_length=0) error_code: None = None created_at: datetime updated_at: datetime