
- Fix unused imports in API endpoints - Add proper __all__ exports in model and schema modules - Add proper TYPE_CHECKING imports in models to prevent circular imports - Fix import order in migrations - Fix long lines in migration scripts - All ruff checks passing
19 lines
408 B
Python
19 lines
408 B
Python
from typing import Any
|
|
|
|
from sqlalchemy.ext.declarative import declared_attr
|
|
from sqlalchemy.orm import DeclarativeBase
|
|
|
|
|
|
class Base(DeclarativeBase):
|
|
"""
|
|
Base class for all database models.
|
|
"""
|
|
|
|
id: Any
|
|
|
|
@declared_attr
|
|
def __tablename__(cls) -> str:
|
|
"""
|
|
Generate __tablename__ automatically from the class name.
|
|
"""
|
|
return cls.__name__.lower() |