from django.urls import path, include
from rest_framework.routers import DefaultRouter
from apps.enm.views import (MpointViewSet, MpointStatViewSet, 
                            EnStatViewSet, EnStat2ViewSet, XscriptViewSet, MpLogxAPIView)

API_BASE_URL = 'api/enm/'
HTML_BASE_URL = 'dhtml/enm/'

router = DefaultRouter()
router.register('mpoint', MpointViewSet, basename='mpoint')
# router.register('mplogx', MpLogxViewSet, basename='mplogx')
router.register('mpointstat', MpointStatViewSet, basename='mpointstat')
router.register('enstat', EnStatViewSet, basename='enstat')
router.register('enstat2', EnStat2ViewSet, basename='enstat2')
router.register('xscript', XscriptViewSet, basename='xscript')
urlpatterns = [
    path(API_BASE_URL, include(router.urls)),
    path(f'{API_BASE_URL}mplogx/', MpLogxAPIView.as_view(), name='mplogx_list'),
]