Renaming BaseModel
Hello
BaseModel is an import from pydantic.
Using that same name for the Base from sqlachemy can be misleading, and not aligned to the other examples.
I therefore suggest to use the same naming that the other example.
Pierre
@@ -12,10 +12,10 @@ class MyModel(BaseModel):
orm_mode = True
-BaseModel = declarative_base()
+Base = declarative_base()
-class SQLModel(BaseModel):
+class SQLModel(Base):
__tablename__ = 'my_table'
id = sa.Column('id', sa.Integer, primary_key=True)
# 'metadata' is reserved by SQLAlchemy, hence the '_'
