✨ Compatible with pydantic 2.0 using the pydantic compatibility layer provided by nonebot

This commit is contained in:
HibiKier
2025-01-10 12:19:11 +08:00
committed by BalconyJH
parent 23ef00d01f
commit e814469b75
69 changed files with 178 additions and 147 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ class Token(BaseModel):
token_type: str
class Result(Generic[RT], BaseModel):
class Result(BaseModel, Generic[RT]):
"""
总体返回
"""
@@ -58,7 +58,7 @@ class QueryModel(BaseModel, Generic[T]):
"""页数"""
size: int
"""每页数量"""
data: T
data: T | None = None
"""携带数据"""
@validator("index")