create skeleton for lab 4

This commit is contained in:
2026-11-04 21:27:54 +03:00
parent ec540a1a72
commit 8503c1b6cd
133 changed files with 10856 additions and 40 deletions
+23
View File
@@ -0,0 +1,23 @@
"""Публичные 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