Skip to content

Commit

Permalink
Update system config to be dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-clan committed Nov 6, 2024
1 parent 0a1f0a9 commit cc73a77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
17 changes: 4 additions & 13 deletions backend/app/admin/model/sys_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,7 @@ class Config(Base):
__tablename__ = 'sys_config'

id: Mapped[id_key] = mapped_column(init=False)
login_title: Mapped[str] = mapped_column(String(20), default='登录 FBA', comment='登录页面标题')
login_sub_title: Mapped[str] = mapped_column(
String(50), default='fastapi_best_architecture', comment='登录页面子标题'
)
footer: Mapped[str] = mapped_column(String(50), default='FBA', comment='页脚标题')
logo: Mapped[str] = mapped_column(LONGTEXT, default='Arco', comment='Logo')
system_title: Mapped[str] = mapped_column(String(20), default='Arco', comment='系统标题')
system_comment: Mapped[str] = mapped_column(
LONGTEXT,
default='基于 FastAPI 构建的前后端分离 RBAC 权限控制系统,采用独特的伪三层架构模型设计,'
'内置 fastapi-admin 基本实现,并作为模板库免费开源',
comment='系统描述',
)
name: Mapped[str] = mapped_column(String(20), comment='名称')
type: Mapped[str] = mapped_column(String(20), comment='类型')
key: Mapped[str] = mapped_column(String(50), comment='键名')
value: Mapped[str] = mapped_column(LONGTEXT, comment='键值')
6 changes: 6 additions & 0 deletions backend/common/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ class UserSocialType(StrEnum):
linuxdo = 'LinuxDo'


class ConfigType(StrEnum):
"""系统配置类型"""

website = 'website'


class GenModelMySQLColumnType(StrEnum):
"""代码生成模型列类型(MySQL)"""

Expand Down

0 comments on commit cc73a77

Please sign in to comment.