44 lines
796 B
Python
44 lines
796 B
Python
"""
|
|
Module de base de données pour PriceWatch Phase 2.
|
|
|
|
Gère la persistence PostgreSQL avec SQLAlchemy ORM.
|
|
"""
|
|
|
|
from pricewatch.app.db.connection import (
|
|
check_db_connection,
|
|
get_engine,
|
|
get_session,
|
|
get_session_factory,
|
|
init_db,
|
|
reset_engine,
|
|
)
|
|
from pricewatch.app.db.repository import ProductRepository
|
|
from pricewatch.app.db.models import (
|
|
Base,
|
|
Product,
|
|
PriceHistory,
|
|
ProductImage,
|
|
ProductSpec,
|
|
ScrapingLog,
|
|
Webhook,
|
|
)
|
|
|
|
__all__ = [
|
|
# Models
|
|
"Base",
|
|
"Product",
|
|
"PriceHistory",
|
|
"ProductImage",
|
|
"ProductSpec",
|
|
"ScrapingLog",
|
|
"Webhook",
|
|
"ProductRepository",
|
|
# Connection
|
|
"get_engine",
|
|
"get_session_factory",
|
|
"get_session",
|
|
"init_db",
|
|
"check_db_connection",
|
|
"reset_engine",
|
|
]
|