mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-13 04:39:41 +00:00
refactor(字段命名): 统一将created_at和updated_at重命名为created_time和updated_time
重构字段命名以保持一致性,将时间相关字段从created_at/updated_at统一改为created_time/updated_time 同时调整相关查询参数、服务层映射和模板文件中的字段命名 优化权限过滤逻辑,提取为独立的Permission类
This commit is contained in:
@@ -13,7 +13,7 @@ class RoleQueryParam:
|
||||
self,
|
||||
name: Optional[str] = Query(None, description="角色名称"),
|
||||
status: Optional[bool] = Query(None, description="是否可用"),
|
||||
creator: Optional[int] = Query(None, description="创建人"),
|
||||
created_id: Optional[int] = Query(None, description="创建人"),
|
||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
||||
) -> None:
|
||||
@@ -22,9 +22,9 @@ class RoleQueryParam:
|
||||
self.name = ("like", name)
|
||||
|
||||
# 精确查询字段
|
||||
self.created_id = creator
|
||||
self.created_id = created_id
|
||||
self.status = status
|
||||
|
||||
# 时间范围查询
|
||||
if start_time and end_time:
|
||||
self.created_at = ("between", (start_time, end_time))
|
||||
self.created_time = ("between", (start_time, end_time))
|
||||
|
||||
Reference in New Issue
Block a user