feat: complete lab4 attachment endpoints, s3 storage and updated_at field

This commit is contained in:
2026-11-11 21:11:47 +03:00
parent b815cef838
commit 95466a864a
7 changed files with 135 additions and 223 deletions
+1
View File
@@ -127,6 +127,7 @@ class Attachment(Base):
error_code: Mapped[str] = mapped_column(String(50), nullable=True)
s3_key: Mapped[str] = mapped_column(String(500), nullable=False)
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=lambda: datetime.now(timezone.utc), nullable=False)
updated_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=lambda: datetime.now(timezone.utc), onupdate=lambda: datetime.now(timezone.utc), nullable=False)
class MessageAttachment(Base):
__tablename__ = "message_attachments"