feat: добавить вложения с хранением в MinIO и отчёт lab4

Co-authored-by: aider (deepseek/deepseek-chat) <aider@aider.chat>
This commit is contained in:
Evgeny Bushkov
2026-11-06 15:18:08 +03:00
co-authored by aider
parent 7542225498
commit 7537719fc6
17 changed files with 1005 additions and 24 deletions
+29 -1
View File
@@ -49,11 +49,39 @@ class MessageOut(BaseModel):
sender_id: uuid.UUID
text: str
created_at: datetime
attachment_ids: List[uuid.UUID] = Field(default_factory=list)
class CreateMessage(BaseModel):
model_config = ConfigDict(extra="forbid")
text: str = Field(min_length=1, max_length=4000)
text: str = Field(default="", max_length=4000)
attachment_ids: List[uuid.UUID] = Field(default_factory=list, max_length=10)
class VariantOut(BaseModel):
model_config = ConfigDict(extra="forbid")
name: str
content_type: str
size_bytes: int
width: int
height: int
sha256: str
class AttachmentOut(BaseModel):
model_config = ConfigDict(extra="forbid")
id: uuid.UUID
chat_id: uuid.UUID
owner_id: uuid.UUID
filename: str
content_type: str
size_bytes: int
sha256: str
status: str
variants: List[VariantOut] = Field(default_factory=list)
error_code: Optional[str] = None
created_at: datetime
updated_at: datetime
class ChatPage(BaseModel):