mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 04:46:26 +00:00
- 修正了RedisCURD.mget调用时传递keys参数的方式,去除多余的展开运算符 - 删除了无用的UpdateSystemParamsSchema定义,简化参数模型代码 - 更新系统初始化配置获取逻辑,统一修正mget的keys传递方式 - 调整系统初始化配置json数据,完善帮助文档、隐私政策、用户协议等字段 - 修改开发环境数据库配置,切换为PostgreSQL并更新相应端口及用户信息 - 删除冗余MySQL数据库备份脚本,避免版本管理中的重复和混乱
27 lines
947 B
Python
27 lines
947 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from typing import Optional
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
from app.core.base_schema import BaseSchema
|
|
|
|
|
|
class ParamsCreateSchema(BaseModel):
|
|
"""配置创建模型"""
|
|
config_name: str = Field(..., max_length=500, description="参数名称")
|
|
config_key: str = Field(..., max_length=500, description="参数键名")
|
|
config_value: Optional[str] = Field(default=None, description="参数键值")
|
|
config_type: bool = Field(default=False, description="系统内置(True:是 False:否)")
|
|
status: bool = Field(default=True, description="状态(True:正常 False:停用)")
|
|
description: Optional[str] = Field(default=None, max_length=500, description="描述")
|
|
|
|
|
|
class ParamsUpdateSchema(ParamsCreateSchema):
|
|
"""配置更新模型"""
|
|
...
|
|
|
|
|
|
class ParamsOutSchema(ParamsCreateSchema, BaseSchema):
|
|
"""配置响应模型"""
|
|
model_config = ConfigDict(from_attributes=True)
|