from django.urls import path, include
from rest_framework.routers import DefaultRouter
from apps.sam.views import (CustomerViewSet, ContractViewSet, OrderViewSet, OrderItemViewSet, ContractRecordViewSet)

API_BASE_URL = 'api/sam/'
HTML_BASE_URL = 'dhtml/sam/'

router = DefaultRouter()
router.register('customer', CustomerViewSet, basename='customer')
router.register('contract', ContractViewSet, basename='contract')
router.register('contract_record', ContractRecordViewSet, basename='contract_record')
router.register('order', OrderViewSet, basename='order')
router.register('orderitem', OrderItemViewSet, basename='orderitem')
urlpatterns = [
    path(API_BASE_URL, include(router.urls)),
]
