加入部分消息通知入口,同步前端管理
This commit is contained in:
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