Skip to content

Commit cc73a77

Browse files
committed
Update system config to be dynamic
1 parent 0a1f0a9 commit cc73a77

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

backend/app/admin/model/sys_config.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,7 @@ class Config(Base):
1313
__tablename__ = 'sys_config'
1414

1515
id: Mapped[id_key] = mapped_column(init=False)
16-
login_title: Mapped[str] = mapped_column(String(20), default='登录 FBA', comment='登录页面标题')
17-
login_sub_title: Mapped[str] = mapped_column(
18-
String(50), default='fastapi_best_architecture', comment='登录页面子标题'
19-
)
20-
footer: Mapped[str] = mapped_column(String(50), default='FBA', comment='页脚标题')
21-
logo: Mapped[str] = mapped_column(LONGTEXT, default='Arco', comment='Logo')
22-
system_title: Mapped[str] = mapped_column(String(20), default='Arco', comment='系统标题')
23-
system_comment: Mapped[str] = mapped_column(
24-
LONGTEXT,
25-
default='基于 FastAPI 构建的前后端分离 RBAC 权限控制系统,采用独特的伪三层架构模型设计,'
26-
'内置 fastapi-admin 基本实现,并作为模板库免费开源',
27-
comment='系统描述',
28-
)
16+
name: Mapped[str] = mapped_column(String(20), comment='名称')
17+
type: Mapped[str] = mapped_column(String(20), comment='类型')
18+
key: Mapped[str] = mapped_column(String(50), comment='键名')
19+
value: Mapped[str] = mapped_column(LONGTEXT, comment='键值')

backend/common/enums.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ class UserSocialType(StrEnum):
9090
linuxdo = 'LinuxDo'
9191

9292

93+
class ConfigType(StrEnum):
94+
"""系统配置类型"""
95+
96+
website = 'website'
97+
98+
9399
class GenModelMySQLColumnType(StrEnum):
94100
"""代码生成模型列类型(MySQL)"""
95101

0 commit comments

Comments
 (0)