from django.urls            import path, include
from rest_framework.routers import DefaultRouter
from .                      import views

router = DefaultRouter()
router.register(r'equipments', views.EquipmentViewSet, basename='equipment')

urlpatterns = [
    path("api/", include(router.urls)),
    path("equipments/", views.EquipmentListView.as_view(), name="equipment_list"),
    path("equipments/create/", views.EquipmentCreateView.as_view(), name="equipment_create"),
    path("equipments/<int:pk>/", views.EquipmentDetailView.as_view(), name="equipment_detail"),
    path("equipments/<int:pk>/update/", views.EquipmentUpdateView.as_view(), name="equipment_update"),
    path("equipments/<int:pk>/delete/", views.EquipmentDeleteView.as_view(), name="equipment_delete"),
]