"""
Módulo de permisos multi-tenant.
Proporciona modelos, servicios y rutas para gestión de permisos granulares por companye.
"""

from .models import (
    Permission,
    CompanyRole,
    RolePermission,
    UserCompanyRole,
    UserCompanyPermission,
)
from .service import PermissionService
from .dependencies import (
    PermissionChecker,
    RequirePermission,
    get_permission_service,
    get_current_user_permissions,
)
from .routes import router
from .seed_v2 import register_core_permissions

# Registrar permisos al cargar el módulo
register_core_permissions()

__all__ = [
    # Models
    "Permission",
    "CompanyRole",
    "RolePermission",
    "UserCompanyRole",
    "UserCompanyPermission",
    # Service
    "PermissionService",
    # Dependencies
    "PermissionChecker",
    "RequirePermission",
    "get_permission_service",
    "get_current_user_permissions",
    # Router
    "router",
]
