
- Setup project structure with FastAPI - Create Todo model and database schemas - Implement CRUD operations for Todo items - Create API endpoints for Todo operations - Add health check endpoint - Configure Alembic for database migrations - Add detailed documentation in README.md
15 lines
315 B
Python
15 lines
315 B
Python
from typing import Any
|
|
|
|
from sqlalchemy.ext.declarative import declared_attr
|
|
from sqlalchemy.orm import DeclarativeBase
|
|
|
|
|
|
class Base(DeclarativeBase):
|
|
id: Any
|
|
__name__: str
|
|
|
|
# Generate __tablename__ automatically
|
|
@declared_attr
|
|
def __tablename__(cls) -> str:
|
|
return cls.__name__.lower()
|