diff --git a/README.md b/README.md index 78760cc..1b6072a 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ class AccountWechats(Base): auth_refresh_token = Column(String(255), nullable=False) class Config: - orm_mode = True # 允许与Pydantic的ORM功能兼容,直接读取数据库模型对象 + from_attributes = True # 允许与Pydantic的ORM功能兼容,直接读取数据库模型对象 ``` ### 2.创建schema: @@ -186,7 +186,7 @@ class AccountWechats(AccountWechatsBase): acid: int # 表中的主键ID class Config: - orm_mode = True # 允许与ORM对象进行直接转换 + from_attributes = True # 允许与ORM对象进行直接转换 ``` ### 3.创建 CRUD (可选,不知道创建什么逻辑可以先跳过):