mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-23 21:18:09 +00:00
2、后端过滤数据权限优化逻辑 3、获取在线用户缓存crud中keys变为*keys 4、前端状态查询修订 5、前端文件管理列表修订icon控制台警告 6、前端布局页面通知公告信息对接后端完成
24 lines
676 B
Python
24 lines
676 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from typing import Optional
|
|
from fastapi import Query
|
|
|
|
class NoticeQueryParams:
|
|
"""字典管理查询参数"""
|
|
|
|
def __init__(
|
|
self,
|
|
notice_title: Optional[str] = Query(None, description="公告标题", min_length=2, max_length=20),
|
|
available: Optional[bool] = Query(None, description="是否可用"),
|
|
creator: Optional[int] = Query(None, description="创建人"),
|
|
) -> None:
|
|
super().__init__()
|
|
|
|
# 模糊查询字段
|
|
self.notice_title = ("like", notice_title)
|
|
|
|
# 精确查询字段
|
|
self.creator_id = creator
|
|
self.available = available
|
|
|