feat: add models part 2

This commit is contained in:
firedotguy
2026-01-31 18:28:23 +03:00
parent a388426d8d
commit 2a9f7da9a9
9 changed files with 183 additions and 48 deletions

View File

@@ -2,9 +2,25 @@ from uuid import UUID
from pydantic import BaseModel, Field
from itd.enums import AttachType
class File(BaseModel):
id: UUID
url: str
filename: str
mime_type: str = Field('image/png', alias='mimeType')
size: int
size: int
class Attach(BaseModel):
id: UUID
type: AttachType = AttachType.IMAGE
url: str
thumbnail_url: str | None = Field(None, alias='thumbnailUrl')
filename: str
mime_type: str = Field(alias='mimeType')
size: int
width: int | None = None
height: int | None = None
duration: int | None = None
order: int = 0