taskmanagerapi-8e2xek/app/db/base_class.py
Automated Action d60cfb5c4f Create Task Manager API with FastAPI and SQLite
- Set up FastAPI project structure
- Create Task model with SQLAlchemy
- Set up Alembic for migrations
- Create CRUD operations for tasks
- Implement API endpoints for tasks
- Add health check endpoint
- Update documentation

generated with BackendIM... (backend.im)
2025-05-13 23:23:43 +00:00

13 lines
291 B
Python

from typing import Any
from sqlalchemy.ext.declarative import as_declarative, declared_attr
@as_declarative()
class Base:
id: Any
__name__: str
# Generate __tablename__ automatically
@declared_attr
def __tablename__(cls) -> str:
return cls.__name__.lower()