ktianc afa9110771 1. 更新:kinit-api:core/crud.py keys 查询多外键时需添加onclause属性
2. 修复:kinit-admin: form属性设置了ifshow无法设置值问题修复
3. 修复:kinit-admin:表格字段设置缓存问题修复
2023-02-08 11:11:28 +08:00

34 lines
805 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
class UserParams(QueryParams):
"""
列表分页
"""
def __init__(
self,
name: str = None,
telephone: str = None,
is_active: bool | str = None,
params: Paging = Depends()
):
super().__init__(params)
self.name = ("like", name)
self.telephone = ("like", telephone)
self.is_active = is_active