fix: add folder_id and sort_order to AIChatSession model, fix UUID conversion in routes, add migration 0003
This commit is contained in:
@@ -149,6 +149,12 @@ class AIChatSession(Base, TenantMixin):
|
||||
title: Mapped[str] = mapped_column(String(255), nullable=False, default="Neuer Chat")
|
||||
is_pinned: Mapped[bool] = mapped_column(Boolean, nullable=False, default=False)
|
||||
is_sidebar: Mapped[bool] = mapped_column(Boolean, nullable=False, default=False)
|
||||
folder_id: Mapped[uuid.UUID | None] = mapped_column(
|
||||
PGUUID(as_uuid=True),
|
||||
ForeignKey("ai_chat_folders.id", ondelete="SET NULL"),
|
||||
nullable=True,
|
||||
)
|
||||
sort_order: Mapped[int] = mapped_column(Integer, nullable=False, default=0)
|
||||
|
||||
|
||||
# --- Chat Messages ---
|
||||
@@ -200,6 +206,7 @@ class AIChatFolder(Base, TenantMixin):
|
||||
nullable=True,
|
||||
)
|
||||
user_id: Mapped[uuid.UUID] = mapped_column(PGUUID(as_uuid=True), nullable=False)
|
||||
sort_order: Mapped[int] = mapped_column(Integer, nullable=False, default=0)
|
||||
|
||||
|
||||
# --- Chat Attachments ---
|
||||
|
||||
Reference in New Issue
Block a user