
- Set up FastAPI application structure - Implement SQLite database with SQLAlchemy - Create WhatsApp webhook endpoints - Implement message storage and analysis - Integrate Gemini 2.5 Pro for message analysis - Add email delivery of insights - Configure APScheduler for weekend analysis - Add linting with Ruff
21 lines
407 B
Python
21 lines
407 B
Python
"""
|
|
Base class for SQLAlchemy models.
|
|
"""
|
|
from typing import Any
|
|
|
|
from sqlalchemy.ext.declarative import as_declarative, declared_attr
|
|
|
|
|
|
@as_declarative()
|
|
class Base:
|
|
"""
|
|
Base class for all SQLAlchemy models.
|
|
"""
|
|
id: Any
|
|
__name__: str
|
|
|
|
# Generate tablename automatically based on class name
|
|
@declared_attr
|
|
def __tablename__(self) -> str:
|
|
return self.__name__.lower()
|