"""Tenancy infrastructure for row-level multi-tenant isolation.

Provides abstract mixins, managers, and context services for row-level tenant
isolation. Schema-level tenancy (via django-tenants) is configured entirely in
the consuming project and does not require these tools.

Usage:
    from icv_core.tenancy import (
        TenantAwareMixin,
        TenantOwnedMixin,
        TenantScopedManager,
        get_current_tenant,
        set_current_tenant,
        tenant_context,
        clear_current_tenant,
    )
"""

from icv_core.tenancy.context import (
    clear_current_tenant,
    get_current_tenant,
    set_current_tenant,
    tenant_context,
)
from icv_core.tenancy.managers import TenantScopedManager, TenantScopedQuerySet
from icv_core.tenancy.mixins import TenantAwareMixin, TenantOwnedMixin

__all__ = [
    # Context management
    "get_current_tenant",
    "set_current_tenant",
    "clear_current_tenant",
    "tenant_context",
    # Managers
    "TenantScopedManager",
    "TenantScopedQuerySet",
    # Mixins
    "TenantAwareMixin",
    "TenantOwnedMixin",
]
