refactor: 基于fastapi0.115.0版本新特性,直接使用pydantic模型接收查询参数和表单数据,移除as_query和as_form使用方式

This commit is contained in:
insistence
2024-09-29 09:43:38 +08:00
parent 8a964bf3f5
commit 5a04889f84
22 changed files with 40 additions and 81 deletions

View File

@@ -3,7 +3,6 @@ from pydantic import BaseModel, ConfigDict, Field
from pydantic.alias_generators import to_camel
from pydantic_validation_decorator import Network, NotBlank, Size
from typing import Literal, Optional
from module_admin.annotation.pydantic_annotation import as_query
class DeptModel(BaseModel):
@@ -53,7 +52,6 @@ class DeptModel(BaseModel):
self.get_email()
@as_query
class DeptQueryModel(DeptModel):
"""
部门管理不分页查询模型