base-unmapped

This commit is contained in:
tonyrewin 2023-01-31 10:44:06 +03:00
parent b9b7d330d2
commit 600bda2e43

View File

@ -28,12 +28,11 @@ class Base(declarative_base()):
__tablename__: str
__new__: Callable
__init__: Callable
# qualify the base with __allow_unmapped__. Can also be
# applied to classes directly if preferred
__allow_unmapped__ = True
__abstract__: bool = True
__abstract__ = True
__table_args__ = {"extend_existing": True}
id: int = Column(Integer, primary_key=True)
id = Column(Integer, primary_key=True)
def __init_subclass__(cls, **kwargs):
REGISTRY[cls.__name__] = cls