You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
250 B

  1. from typing import Any
  2. from sqlalchemy.ext.declarative import declared_attr
  3. from sqlalchemy.orm import as_declarative
  4. @as_declarative()
  5. class Base:
  6. id: Any
  7. __name__: str
  8. def __tablename__(cls) -> str:
  9. return cls.__name__.lower()