31 lines
919 B
Python
31 lines
919 B
Python
"""
|
|
Routes for PedimentoDates CRUD operations
|
|
"""
|
|
|
|
from api.v1.common.tenant_crud_routes import TenantCRUDRoutes
|
|
|
|
from ..dtos.pedimento_dates import (
|
|
PedimentoDatesCreate,
|
|
PedimentoDatesResponse,
|
|
PedimentoDatesUpdate,
|
|
)
|
|
from ..services.pedimento_dates import PedimentoDatesService
|
|
|
|
# Create router with generic CRUD routes for child resource
|
|
router = TenantCRUDRoutes(
|
|
service=PedimentoDatesService,
|
|
create_schema=PedimentoDatesCreate,
|
|
update_schema=PedimentoDatesUpdate,
|
|
response_schema=PedimentoDatesResponse,
|
|
prefix="/{pedimento_id}/dates",
|
|
tags=[],
|
|
resource_name="Pedimento dates",
|
|
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
|