mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 20:55:14 +00:00
refactor: 统一项目中状态字段类型为数字类型
这是一个大规模的类型对齐优化: 1. 将多处字符串类型的status字段统一改为数字类型,包括前后端接口定义、数据模型、页面组件 2. 重构编排节点相关的命名和注释,统一改为"节点类型"替代"编排节点类型" 3. 移除了过时的忘记密码相关接口和模板代码 4. 优化搜索栏组件,支持展开仅显示次要字段 5. 调整部分接口参数和路由逻辑,对齐前后端参数格式
This commit is contained in:
@@ -309,7 +309,10 @@ class GenTableQueryParam(BaseQueryParam, UserByQueryParam, TenantByQueryParam):
|
||||
|
||||
table_name: str | None = Query(None, description="表名称")
|
||||
table_comment: str | None = Query(None, description="表注释")
|
||||
status: int | None = Query(None, ge=0, le=1, description="状态(0:启动 1:停用)")
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
self.table_name = (QueueEnum.like.value, self.table_name) if self.table_name else None
|
||||
self.table_comment = (QueueEnum.like.value, self.table_comment) if self.table_comment else None
|
||||
if isinstance(self.status, int):
|
||||
self.status = (QueueEnum.eq.value, self.status)
|
||||
|
||||
Reference in New Issue
Block a user