mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-23 13:13:09 +00:00
refactor: 重构查询参数实现,替换旧的__init__初始化方式为dataclass+post_init
feat: 新增岗位编码字段与校验 fix: 修复批量删除提示、请求缓存、任务状态等逻辑 perf: 优化表格列展示,移除冗余ID列 build: 降级fastapi版本至0.115.2,更新依赖锁文件 docs: 补充部分代码注释与说明
This commit is contained in:
@@ -307,14 +307,9 @@ class GenTableQueryParam(BaseQueryParam, UserByQueryParam, TenantByQueryParam):
|
||||
- 空值将被忽略,不参与过滤。
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
table_name: str | None = Query(None, description="表名称"),
|
||||
table_comment: str | None = Query(None, description="表注释"),
|
||||
*args,
|
||||
**kwargs,
|
||||
) -> None:
|
||||
super().__init__(*args, **kwargs)
|
||||
# 模糊查询字段
|
||||
self.table_name = (QueueEnum.like.value, table_name) if table_name else None
|
||||
self.table_comment = (QueueEnum.like.value, table_comment) if table_comment else None
|
||||
table_name: str | None = Query(None, description="表名称")
|
||||
table_comment: str | None = Query(None, description="表注释")
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user