✨ 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
+4
View File
@@ -1,3 +1,4 @@
from nonebot.compat import model_dump
from pydantic import BaseModel
@@ -8,3 +9,6 @@ class Barh(BaseModel):
"""实际数据"""
title: str
"""标题"""
def to_dict(self, **kwargs):
return model_dump(self, **kwargs)