from django.urls import path
from .views import DataListView, DataDetailView, DataCreateView, DataUpdateView, DataDeleteView,\
DataMsCRUDView, TbFgPressInfoLotListCRUDView, LotSummaryCRUDView, VMasterViewCRUDView, MgMasterViewCRUDView,\
BelMasterViewCRUDView, EMasterViewCRUDView, DataRLCRUDView, DataWbCRUDView, LotSummaryRlCRUDView, \
LotSummaryWbCRUDView, RotateDataCRUDView, ManualsizeCRUDView, AllProductDimensionForInsProcessCRUDView, \
RotateBrokenTestCRUDView

app_name = 'legacy'  # Namespace for this app

datams_crud = DataMsCRUDView()
fg_crud = TbFgPressInfoLotListCRUDView()
ls_crud = LotSummaryCRUDView()
vm_crud = VMasterViewCRUDView()
mg_crud = MgMasterViewCRUDView()
bel_crud = BelMasterViewCRUDView()
em_crud = EMasterViewCRUDView()
datarl_crud = DataRLCRUDView()
datawb_crud = DataWbCRUDView()
lsrl_crud = LotSummaryRlCRUDView()
lswb_crud = LotSummaryWbCRUDView()
rotate_crud = RotateDataCRUDView()
manualsize_crud = ManualsizeCRUDView()
allproductdimension_crud = AllProductDimensionForInsProcessCRUDView()
rotate_broken_test_crud = RotateBrokenTestCRUDView()

urlpatterns = [
    path('data/', DataListView.as_view(), name='data-list'),            # data/
    path('data/<int:pk>/', DataDetailView.as_view(), name='data-detail'),  # data/<pk>/
    path('data/create/', DataCreateView.as_view(), name='data-create'), # data/create/
    path('data/<int:pk>/update/', DataUpdateView.as_view(), name='data-update'),  # data/<pk>/update/
    path('data/<int:pk>/delete/', DataDeleteView.as_view(), name='data-delete'),  # data/<pk>/delete/
    
    path('datams/', datams_crud.get_list_view().as_view(), name='datams-list'),
    path('datams/create/', datams_crud.get_create_view().as_view(), name='datams-create'),
    path('datams/<int:pk>/update/', datams_crud.get_update_view().as_view(), name='datams-update'),
    path('datams/<int:pk>/delete/', datams_crud.get_delete_view().as_view(), name='datams-delete'),

    path('datarl/', datarl_crud.get_list_view().as_view(), name='datarl-list'),
    path('datarl/create/', datarl_crud.get_create_view().as_view(), name='datarl-create'),
    path('datarl/<int:pk>/update/', datarl_crud.get_update_view().as_view(), name='datarl-update'),
    path('datarl/<int:pk>/delete/', datarl_crud.get_delete_view().as_view(), name='datarl-delete'),

    path('datawb/', datawb_crud.get_list_view().as_view(), name='datawb-list'),
    path('datawb/create/', datawb_crud.get_create_view().as_view(), name='datawb-create'),
    path('datawb/<int:pk>/update/', datawb_crud.get_update_view().as_view(), name='datawb-update'),
    path('datawb/<int:pk>/delete/', datawb_crud.get_delete_view().as_view(), name='datawb-delete'),
    
    path('fg/', fg_crud.get_list_view().as_view(), name='fg-list'),
    path('fg/create/', fg_crud.get_create_view().as_view(), name='fg-create'),
    path('fg/<int:pk>/update/', fg_crud.get_update_view().as_view(), name='fg-update'),
    path('fg/<int:pk>/delete/', fg_crud.get_delete_view().as_view(), name='fg-delete'),

    path('ls/', ls_crud.get_list_view().as_view(), name='ls-list'),
    path('ls/create/', ls_crud.get_create_view().as_view(), name='ls-create'),
    path('ls/<int:pk>/update/', ls_crud.get_update_view().as_view(), name='ls-update'),
    path('ls/<int:pk>/delete/', ls_crud.get_delete_view().as_view(), name='ls-delete'),

    path('vm/', vm_crud.get_list_view().as_view(), name='vm-list'),
    path('vm/create/', vm_crud.get_create_view().as_view(), name='vm-create'),
    path('vm/<str:pk>/update/', vm_crud.get_update_view().as_view(), name='vm-update'),
    path('vm/<str:pk>/delete/', vm_crud.get_delete_view().as_view(), name='vm-delete'),

    path('mg/', mg_crud.get_list_view().as_view(), name='mg-list'),
    path('mg/create/', mg_crud.get_create_view().as_view(), name='mg-create'),
    path('mg/<str:pk>/update/', mg_crud.get_update_view().as_view(), name='mg-update'),
    path('mg/<str:pk>/delete/', mg_crud.get_delete_view().as_view(), name='mg-delete'),

    path('bel/', bel_crud.get_list_view().as_view(), name='bel-list'),
    path('bel/create/', bel_crud.get_create_view().as_view(), name='bel-create'),
    path('bel/<str:pk>/update/', bel_crud.get_update_view().as_view(), name='bel-update'),
    path('bel/<str:pk>/delete/', bel_crud.get_delete_view().as_view(), name='bel-delete'),

    path('em/', em_crud.get_list_view().as_view(), name='em-list'),
    path('em/create/', em_crud.get_create_view().as_view(), name='em-create'),
    path('em/<str:pk>/update/', em_crud.get_update_view().as_view(), name='em-update'),
    path('em/<str:pk>/delete/', em_crud.get_delete_view().as_view(), name='em-delete'),


    path('lsrl/', lsrl_crud.get_list_view().as_view(), name='lsrl-list'),
    path('lsrl/create/', lsrl_crud.get_create_view().as_view(), name='lsrl-create'),
    path('lsrl/<int:pk>/update/', lsrl_crud.get_update_view().as_view(), name='lsrl-update'),
    path('lsrl/<int:pk>/delete/', lsrl_crud.get_delete_view().as_view(), name='lsrl-delete'),

    path('lswb/', lswb_crud.get_list_view().as_view(), name='lswb-list'),
    path('lswb/create/', lswb_crud.get_create_view().as_view(), name='lswb-create'),
    path('lswb/<int:pk>/update/', lswb_crud.get_update_view().as_view(), name='lswb-update'),
    path('lswb/<int:pk>/delete/', lswb_crud.get_delete_view().as_view(), name='lswb-delete'),

    path('rotate/', rotate_crud.get_list_view().as_view(), name='rotate-list'),
    path('rotate/create/', rotate_crud.get_create_view().as_view(), name='rotate-create'),
    path('rotate/<int:pk>/update/', rotate_crud.get_update_view().as_view(), name='rotate-update'),
    path('rotate/<int:pk>/delete/', rotate_crud.get_delete_view().as_view(), name='rotate-delete'),
    # Add this line at line 88
    path('manualsize/', manualsize_crud.get_list_view().as_view(), name='manualsize-list'),
    path('manualsize/create/', manualsize_crud.get_create_view().as_view(), name='manualsize-create'),
    path('manualsize/<str:pk>/update/', manualsize_crud.get_update_view().as_view(), name='manualsize-update'),
    path('manualsize/<str:pk>/delete/', manualsize_crud.get_delete_view().as_view(), name='manualsize-delete'),
    
    path('allproductdimension/', allproductdimension_crud.get_list_view().as_view(), name='allproductdimension-list'),
    path('allproductdimension/create/', allproductdimension_crud.get_create_view().as_view(), name='allproductdimension-create'),
    path('allproductdimension/<str:pk>/update/', allproductdimension_crud.get_update_view().as_view(), name='allproductdimension-update'),
    path('allproductdimension/<str:pk>/delete/', allproductdimension_crud.get_delete_view().as_view(), name='allproductdimension-delete'),

    path('rotatebrokentest/', rotate_broken_test_crud.get_list_view().as_view(), name='rotatebrokentest-list'),
    path('rotatebrokentest/create/', rotate_broken_test_crud.get_create_view().as_view(), name='rotatebrokentest-create'),
    path('rotatebrokentest/<str:pk>/update/', rotate_broken_test_crud.get_update_view().as_view(), name='rotatebrokentest-update'),
    path('rotatebrokentest/<str:pk>/delete/', rotate_broken_test_crud.get_delete_view().as_view(), name='rotatebrokentest-delete'),
]
