"""
Routes for PedimentoConfigUpdateRectification CRUD operations
"""

from api.v1.common.tenant_crud_routes import TenantCRUDRoutes

from ..dtos.pedimento_config_update_rectification import (
    PedimentoConfigUpdateRectificationCreate,
    PedimentoConfigUpdateRectificationResponse,
    PedimentoConfigUpdateRectificationUpdate,
)
from ..services.pedimento_config_update_rectification import (
    PedimentoConfigUpdateRectificationService,
)

# Create router with generic CRUD routes for child resource
router = TenantCRUDRoutes(
    service=PedimentoConfigUpdateRectificationService,
    create_schema=PedimentoConfigUpdateRectificationCreate,
    update_schema=PedimentoConfigUpdateRectificationUpdate,
    response_schema=PedimentoConfigUpdateRectificationResponse,
    prefix="/{pedimento_id}/config-update-rectification",
    tags=[],
    resource_name="Config update rectification",
    parent_id_name="pedimento_id",
    enable_list=False,
    validate_parent_match=True,
    get_permissions=["pedimentos_mgmt.view"],
    create_permissions=["pedimentos_mgmt.edit"],
    update_permissions=["pedimentos_mgmt.edit"],
    delete_permissions=["pedimentos_mgmt.edit"],
).router
