from django.urls import path, include
from rest_framework.routers import DefaultRouter
from . import views

router = DefaultRouter()
router.register(r'', views.FieldViewSet, basename='field')

urlpatterns = [
    path('import/kyosai/', views.import_kyosai_master, name='import_kyosai'),
    path('import/yoshida/', views.import_yoshida_fields, name='import_yoshida'),
    path('import/chusankan/', views.import_chusankan_master, name='import_chusankan'),
    path('export/zip/', views.export_all_zip, name='export_all_zip'),
    path('<int:field_id>/kyosai-links/', views.add_kyosai_links, name='add_kyosai_links'),
    path('<int:field_id>/kyosai-links/<int:kyosai_id>/', views.remove_kyosai_link, name='remove_kyosai_link'),
    path('<int:field_id>/chusankan-links/', views.add_chusankan_links, name='add_chusankan_links'),
    path('<int:field_id>/chusankan-links/<int:chusankan_id>/', views.remove_chusankan_link, name='remove_chusankan_link'),
    path('', include(router.urls)),
]
