Files
root 92fb64aa99 修改
1、微信回调签名验证绕过问题
2、联系请求竞态条件问题
3、contact列表count过滤bug
4、核心业务表索引添加
2026-06-29 10:15:10 +08:00

24 lines
1.0 KiB
Python

from sqlalchemy import Boolean, Integer, String, ForeignKey, Index
from sqlalchemy.orm import Mapped, mapped_column
from app.models.base import Base, TimestampMixin
class MenuConfig(Base, TimestampMixin):
__tablename__ = "menu_configs"
id: Mapped[str] = mapped_column(String(32), primary_key=True)
label: Mapped[str] = mapped_column(String(64))
path: Mapped[str] = mapped_column(String(128), default="")
icon: Mapped[str] = mapped_column(String(64), default="")
sort_order: Mapped[int] = mapped_column(Integer, default=0)
is_active: Mapped[bool] = mapped_column(Boolean, default=True)
parent_id: Mapped[str | None] = mapped_column(String(32), ForeignKey("menu_configs.id"), nullable=True, index=True)
menu_type: Mapped[str] = mapped_column(String(16), default="page")
menu_target: Mapped[str] = mapped_column(String(16), default="frontend")
is_default: Mapped[bool] = mapped_column(Boolean, default=False)
__table_args__ = (
Index('idx_menu_target_active_sort', 'menu_target', 'is_active', 'sort_order'),
)