from django.urls import path, include
from rest_framework.routers import DefaultRouter
from apps.em.views import EquipmentViewSet, EcheckRecordViewSet, EInspectViewSet, EcateViewSet, CdView, RepairViewSet

API_BASE_URL = 'api/em/'
HTML_BASE_URL = 'dhtml/em/'

router = DefaultRouter()
router.register('equipment', EquipmentViewSet, basename='equipment')
router.register('echeckrecord', EcheckRecordViewSet, basename='echeckrecord')
router.register('einspect', EInspectViewSet, basename='einspect')
router.register('ecate', EcateViewSet, basename='ecate')
router.register('repair', RepairViewSet, basename='repair')
urlpatterns = [
    path(API_BASE_URL, include(router.urls)),
    path(API_BASE_URL + 'cd/', CdView.as_view()),
]
