Files
FastapiAdmin/backend/app/api/v1/params/system/menu_param.py
T
zhangtao 390a8e9c41 1、后端查询参数修订
2、后端过滤数据权限优化逻辑
3、获取在线用户缓存crud中keys变为*keys
4、前端状态查询修订
5、前端文件管理列表修订icon控制台警告
6、前端布局页面通知公告信息对接后端完成
2024-12-22 05:25:39 +08:00

30 lines
1.2 KiB
Python

# -*- coding: utf-8 -*-
from typing import Optional, Literal
from fastapi import Query
class MenuQueryParams:
"""菜单管理查询参数"""
def __init__(
self,
name: Optional[str] = Query(None, description="菜单名称", min_length=2, max_length=50),
route_path: Optional[str] = Query(None, description="路由地址", min_length=1, max_length=200),
component_path: Optional[str] = Query(None, description="组件路径", min_length=1, max_length=200),
type: Optional[Literal['M', 'C', 'F']] = Query(None, description="菜单类型(M目录 C菜单 F按钮)"),
permission: Optional[str] = Query(None, description="权限标识", min_length=1, max_length=100),
available: Optional[bool] = Query(None, description="菜单状态(True正常 False停用)"),
) -> None:
super().__init__()
# 模糊查询字段
self.name = ("like", name)
self.route_path = ("like", route_path)
self.component_path = ("like", component_path)
self.permission = ("like", permission)
# 精确查询字段
self.type = type
self.available = available