ktianc 5abaef08cc 1. 修复:移动端头像剪切功能
2. 更新:升级PC端vue-element-plus-admin版本到1.9.2
3. 更新:文件上传接口
4. 新增:kinit-api 命令创建app目录
2023-01-28 12:00:23 +08:00

30 lines
787 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/python
# -*- coding: utf-8 -*-
# @version : 1.0
# @Creaet Time : 2021/10/18 22:19
# @File : user.py
# @IDE : PyCharm
# @desc : 查询参数-类依赖项
"""
类依赖项-官方文档https://fastapi.tiangolo.com/zh/tutorial/dependencies/classes-as-dependencies/
"""
from fastapi import Depends
from core.dependencies import Paging, QueryParams
from typing import Union
class UserParams(QueryParams):
"""
列表分页
"""
def __init__(self, name: str = None, telephone: str = None, is_active: Union[bool, str] = None,
params: Paging = Depends()):
super().__init__(params)
self.name = ("like", name)
self.telephone = ("like", telephone)
self.is_active = is_active