mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-06 20:29:59 +08:00
✨ Compatible with pydantic 2.0 using the pydantic compatibility layer provided by nonebot
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user