"""
Routes for PedimentoRectificationOrigin CRUD operations
"""

from api.v1.common.tenant_crud_routes import TenantCRUDRoutes

from ..dtos.pedimento_rectification_origin import (
    PedimentoRectificationOriginCreate,
    PedimentoRectificationOriginResponse,
    PedimentoRectificationOriginUpdate,
)
from ..services.pedimento_rectification_origin import (
    PedimentoRectificationOriginService,
)

# Create router with generic CRUD routes for child resource
router = TenantCRUDRoutes(
    service=PedimentoRectificationOriginService,
    create_schema=PedimentoRectificationOriginCreate,
    update_schema=PedimentoRectificationOriginUpdate,
    response_schema=PedimentoRectificationOriginResponse,
    prefix="/{pedimento_id}/rectification-origin",
    tags=[],
    resource_name="Rectification origin",
    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
