加入部分消息通知入口,同步前端管理
This commit is contained in:
@@ -5,6 +5,7 @@ from .user import User, InviteCode
|
||||
from .account import Account
|
||||
from .task import Task
|
||||
from .signin_log import SigninLog
|
||||
from .system_config import SystemConfig
|
||||
|
||||
__all__ = [
|
||||
"Base",
|
||||
@@ -16,4 +17,5 @@ __all__ = [
|
||||
"Account",
|
||||
"Task",
|
||||
"SigninLog",
|
||||
"SystemConfig",
|
||||
]
|
||||
|
||||
17
backend/shared/models/system_config.py
Normal file
17
backend/shared/models/system_config.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""SystemConfig ORM model - 系统配置键值表。"""
|
||||
|
||||
from sqlalchemy import Column, DateTime, String
|
||||
from sqlalchemy.sql import func
|
||||
|
||||
from .base import Base
|
||||
|
||||
|
||||
class SystemConfig(Base):
|
||||
__tablename__ = "system_config"
|
||||
|
||||
key = Column(String(64), primary_key=True)
|
||||
value = Column(String(500), nullable=False, default="")
|
||||
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
|
||||
|
||||
def __repr__(self):
|
||||
return f"<SystemConfig(key='{self.key}', value='{self.value[:30]}')>"
|
||||
Reference in New Issue
Block a user