"""Database module for Mantimon TCG.

This module provides the database infrastructure including:
- Async SQLAlchemy engine and session management
- Base model class with common columns
- Redis connection utilities
- All database models

Usage:
    from app.db import get_session, Base
    from app.db.models import User, Deck, Collection

    async with get_session() as session:
        user = await session.get(User, user_id)

    # For FastAPI dependency injection:
    from app.db import get_session_dependency
    from fastapi import Depends

    @app.get("/users/{user_id}")
    async def get_user(session: AsyncSession = Depends(get_session_dependency)):
        ...

Exports:
    - get_session: Async context manager for database sessions
    - get_session_dependency: FastAPI dependency for sessions
    - get_engine: Get the async engine instance
    - Base: Declarative base class for models
    - init_db: Initialize database (create tables)
    - close_db: Close database connections
"""

from app.db.base import Base
from app.db.session import (
    close_db,
    get_engine,
    get_session,
    get_session_dependency,
    init_db,
)

__all__ = [
    "Base",
    "get_session",
    "get_session_dependency",
    "get_engine",
    "init_db",
    "close_db",
]
