from api.v1.common.tenant_crud_routes import TenantCRUDRoutes

from .dto import (
    PermissionRuleOctCreateDTO,
    PermissionRuleOctResponseDTO,
    PermissionRuleOctUpdateDTO,
)
from .services import PermissionRuleOctService

# Create router using TenantCRUDRoutes factory
router = TenantCRUDRoutes(
    service=PermissionRuleOctService,
    create_schema=PermissionRuleOctCreateDTO,
    update_schema=PermissionRuleOctUpdateDTO,
    response_schema=PermissionRuleOctResponseDTO,
    prefix="/permission-rule-oct",
    tags=[],
    resource_name="Permission Rule OCT",
    id_name="id",  # Using numeric ID
    enable_list=True,  # Enable GET /permission-rule-oct with pagination
    enable_filters=True,  # Enable filtering by permission, sector, system
    default_page_size=50,
    max_page_size=100,
).router
