sync update from LAN repo (source dhk-1 @ 3b1ec5b4)
This commit is contained in:
1 parent
da6521b6cb
commit
264e2200d6
995 files changed
+148105
-13399
No files matched your search
+1
@@ -22,6 +22,7 @@ def _normalize(data: dict[str, Any], menu_type: str, updated_by: str | None) ->
|
||||
"placement": placement if placement in {"sidebar", "settings", "toolbox"} else "sidebar",
|
||||
"sort_order": int(data.get("sort_order", 0)),
|
||||
"label": (data.get("label") or None),
|
||||
"disabled": bool(data.get("disabled", False)),
|
||||
"updated_by": updated_by,
|
||||
"updated_at": datetime.now(UTC).isoformat(),
|
||||
}
|
||||
|
||||
+5
-3
@@ -1,14 +1,15 @@
|
||||
"""ORM model for compact/sidebar-summary menu overrides.
|
||||
|
||||
This table only controls the compact left menu presentation. The full sidebar
|
||||
menu layout continues to use ``menu_overrides`` and is unaffected.
|
||||
This table only controls compact menu presentation: lane, order, label and
|
||||
enablement for the left menu, settings menu and toolbox. The full sidebar menu
|
||||
layout continues to use ``menu_overrides`` and is unaffected.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import UTC, datetime
|
||||
|
||||
from sqlalchemy import Index, Integer, String
|
||||
from sqlalchemy import Boolean, Index, Integer, String, false
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from deerflow.persistence.base import Base
|
||||
@@ -24,6 +25,7 @@ class CompactMenuOverrideRow(Base):
|
||||
placement: Mapped[str] = mapped_column(String(32), default="sidebar")
|
||||
sort_order: Mapped[int] = mapped_column(Integer, default=0)
|
||||
label: Mapped[str | None] = mapped_column(String(255))
|
||||
disabled: Mapped[bool] = mapped_column(Boolean, default=False, server_default=false())
|
||||
updated_by: Mapped[str | None] = mapped_column(String(64))
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
BeijingDateTime(), default=lambda: datetime.now(UTC), onupdate=lambda: datetime.now(UTC)
|
||||
|
||||
+2
@@ -41,6 +41,7 @@ def _row_from(data: dict[str, Any], menu_type: str, updated_by: str | None) -> C
|
||||
placement=placement if placement in {"sidebar", "settings", "toolbox"} else "sidebar",
|
||||
sort_order=int(data.get("sort_order", 0)),
|
||||
label=(data.get("label") or None),
|
||||
disabled=bool(data.get("disabled", False)),
|
||||
updated_by=updated_by,
|
||||
)
|
||||
|
||||
@@ -53,6 +54,7 @@ def _normalize_user_row(data: dict[str, Any], menu_type: str) -> dict[str, Any]:
|
||||
"placement": placement if placement in {"sidebar", "settings", "toolbox"} else "sidebar",
|
||||
"sort_order": int(data.get("sort_order", 0)),
|
||||
"label": (data.get("label") or None),
|
||||
"disabled": bool(data.get("disabled", False)),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user