"""
Distribution Service Database Configuration
"""

from shared.database import DatabaseManager, create_database_manager
from .config import settings
import os


# Create database manager instance
database_manager = create_database_manager(settings.DATABASE_URL, service_name="distribution")

# Convenience function to get database sessions
async def get_db():
    """Get database session generator"""
    async with database_manager.get_session() as session:
        yield session