taskmanagerapi-r45vn7/app/db/base_class.py
Automated Action d4b0ceed9c Implement Task Manager API with FastAPI and SQLite
- Setup project structure and FastAPI application
- Configure SQLite database with SQLAlchemy ORM
- Setup Alembic for database migrations
- Implement user authentication with JWT
- Create task models and CRUD operations
- Implement task assignment functionality
- Add detailed API documentation
- Create comprehensive README with usage instructions
- Lint code with Ruff
2025-06-08 18:02:43 +00:00

16 lines
333 B
Python

from typing import Any
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import as_declarative
@as_declarative()
class Base:
id: Any
__name__: str
# Generate tablename automatically based on class name
@declared_attr
def __tablename__(self) -> str:
return self.__name__.lower()