from django.urls import path, include
from rest_framework.routers import DefaultRouter
from apps.inm.views import (
    WarehouseVIewSet, MaterialBatchViewSet, MIOViewSet, 
    MIOItemViewSet, MioDoViewSet, MioSaleViewSet, 
    MioPurViewSet, MioOtherViewSet, MIOItemwViewSet)

API_BASE_URL = 'api/inm/'
HTML_BASE_URL = 'dhtml/inm/'

router = DefaultRouter()
router.register('warehouse', WarehouseVIewSet, basename='warehouse')
router.register('materialbatch', MaterialBatchViewSet,
                basename='materialbatch')
router.register('mio', MIOViewSet, basename='mio')
router.register('mio/do', MioDoViewSet, basename='mio_do')
router.register('mio/sale', MioSaleViewSet, basename='mio_sale')
router.register('mio/pur', MioPurViewSet, basename='mio_pur')
router.register('mio/other', MioOtherViewSet, basename='mio_other')
router.register('mioitem', MIOItemViewSet, basename='mioitem')
router.register('mioitemw', MIOItemwViewSet, basename='mioitemw')
# router.register('pack', PackViewSet, basename='pack')
urlpatterns = [
    path(API_BASE_URL, include(router.urls)),
]
