Automated Action 0cd6e6441d Setup FastAPI REST API for Sports Betting Verification
- Set up FastAPI application structure
- Implemented SQLite database integration with SQLAlchemy
- Added Alembic migrations for database versioning
- Created bet model and API endpoints for CRUD operations
- Added comprehensive README with setup and usage instructions
- Added health check endpoint and CORS support
2025-06-07 13:06:19 +00:00

21 lines
544 B
Python

from typing import Any
from sqlalchemy.ext.declarative import as_declarative, declared_attr
@as_declarative()
class Base:
"""
Base class for all SQLAlchemy models.
Provides common functionality for all models, including:
- Auto-generating table names based on class name
- Any future common model functionality can be added here
"""
id: Any
__name__: str
# Generate tablename automatically from class name
@declared_attr
def __tablename__(cls) -> str:
return cls.__name__.lower()