from django.urls import path

from api_v2.views import (
    ContentTypeListView,
    HealthCheckView,
    QuickCreateEmployeeUserView,
    RoleListView,
    PrintingJobByCustomerView,
    PrintingOrderWithoutSalesOrderView,
    PrintingJobBatchAdvancePreviewView,
    PrintingJobBatchAdvanceSubmitView,
    PrintingJobBatchAddParametersView,
    PrintingOrderExternalSnapshotSyncView,
    PlateOrderByProcessNodeView,
    PlateOrderByProcessView,
    PlateOrderByStateStatusView,
    PlateOrderBatchUpdateView,
    PrintingOrderBatchAdvanceRecordsView,
    BusinessObjectCloneView,
    MissionCancelView,
    MissionByPrintingOrderView,
    MissionCategoryDetailView,
    MissionCategoryListCreateView,
    MissionDetailView,
    MissionListCreateView,
    MissionMyStatusCountsView,
    MissionMyView,
    MissionReopenView,
    MissionReplyListCreateView,
    MissionReplyRejectView,
    MissionSetUrgentView,
    DeviceCategoryListCreateView,
    DeviceCategoryDetailView,
    DeviceListCreateView,
    DeviceDetailView,
    ProductionAssignmentListCreateView,
    ProductionAssignmentDetailView,
    ShipmentDeliveryPhotoDetailView,
    ShipmentDeliveryPhotoListCreateView,
    AgentUnshippedShipmentListView,
    AgentTransportVehicleListView,
    AgentTransportVehicleDetailView,
    AgentMesDeviceListView,
    AgentMesProductionAssignmentListView,
)
from api_v2.views.basic_info import CustomerEmployeeBindingView, MyVisiblePagesView
from api_v2.views.cost import (
    CostCategoryDetailView,
    CostCategoryListCreateView,
    CostEntryDetailView,
    CostEntryListCreateView,
    CostSummaryByCategoryView,
)
from api_v2.views.wecom import WecomBindingView, WecomLoginView

urlpatterns = [
    path('health/', HealthCheckView.as_view(), name='api_v2_health_check'),
    path('roles/', RoleListView.as_view(), name='api_v2_role_list'),
    path('users/quick-create/', QuickCreateEmployeeUserView.as_view(), name='api_v2_user_quick_create'),
    path('customers/bind-employee/', CustomerEmployeeBindingView.as_view(), name='api_v2_customer_bind_employee'),
    path('me/visible-pages/', MyVisiblePagesView.as_view(), name='api_v2_my_visible_pages'),
    path('printing-jobs/by-customer/', PrintingJobByCustomerView.as_view(), name='api_v2_printing_job_by_customer'),
    path('printing-orders/without-sales-order/', PrintingOrderWithoutSalesOrderView.as_view(), name='api_v2_printing_order_without_sales_order'),
    path('printing-jobs/batch-advance/preview/', PrintingJobBatchAdvancePreviewView.as_view(), name='api_v2_printing_job_batch_advance_preview'),
    path('printing-jobs/batch-advance/', PrintingJobBatchAdvanceSubmitView.as_view(), name='api_v2_printing_job_batch_advance_submit'),
    path('printing-jobs/batch-add-parameters/', PrintingJobBatchAddParametersView.as_view(), name='api_v2_printing_job_batch_add_parameters'),
    path('printing-orders/sync-external-snapshot/', PrintingOrderExternalSnapshotSyncView.as_view(), name='api_v2_printing_order_sync_external_snapshot'),
    path('printing-orders/<int:printing_order_id>/batch-advance-records/', PrintingOrderBatchAdvanceRecordsView.as_view(), name='api_v2_printing_order_batch_advance_records'),
    path('plate-orders/by-process-node/', PlateOrderByProcessNodeView.as_view(), name='api_v2_plate_order_by_process_node'),
    path('plate-orders/by-process/', PlateOrderByProcessView.as_view(), name='api_v2_plate_order_by_process'),
    path('plate-orders/by-state-status/', PlateOrderByStateStatusView.as_view(), name='api_v2_plate_order_by_state_status'),
    path('plate-orders/batch-update/', PlateOrderBatchUpdateView.as_view(), name='api_v2_plate_order_batch_update'),
    path('stateflow/business-objects/clone/', BusinessObjectCloneView.as_view(), name='api_v2_stateflow_business_object_clone'),
    path('content-types/', ContentTypeListView.as_view(), name='api_v2_content_type_list'),
    path('ai/shipments/unshipped/', AgentUnshippedShipmentListView.as_view(), name='api_v2_ai_unshipped_shipment_list'),
    path('ai/transport-vehicles/', AgentTransportVehicleListView.as_view(), name='api_v2_ai_transport_vehicle_list'),
    path('ai/transport-vehicles/<str:license_plate>/', AgentTransportVehicleDetailView.as_view(), name='api_v2_ai_transport_vehicle_detail'),
    path('ai/mes/devices/', AgentMesDeviceListView.as_view(), name='api_v2_ai_mes_device_list'),
    path('ai/mes/production-assignments/', AgentMesProductionAssignmentListView.as_view(), name='api_v2_ai_mes_production_assignment_list'),
    path('mission-categories/', MissionCategoryListCreateView.as_view(), name='api_v2_mission_category_list_create'),
    path('mission-categories/<int:category_id>/', MissionCategoryDetailView.as_view(), name='api_v2_mission_category_detail'),
    path('missions/', MissionListCreateView.as_view(), name='api_v2_mission_list_create'),
    path('missions/by-printing-order/<int:printing_order_id>/', MissionByPrintingOrderView.as_view(), name='api_v2_mission_by_printing_order'),
    path('missions/my/', MissionMyView.as_view(), name='api_v2_mission_my'),
    path('missions/my/status-counts/', MissionMyStatusCountsView.as_view(), name='api_v2_mission_my_status_counts'),
    path('missions/<int:mission_id>/', MissionDetailView.as_view(), name='api_v2_mission_detail'),
    path('missions/<int:mission_id>/replies/', MissionReplyListCreateView.as_view(), name='api_v2_mission_reply_list_create'),
    path('missions/<int:mission_id>/reopen/', MissionReopenView.as_view(), name='api_v2_mission_reopen'),
    path('missions/<int:mission_id>/cancel/', MissionCancelView.as_view(), name='api_v2_mission_cancel'),
    path('missions/<int:mission_id>/set-urgent/', MissionSetUrgentView.as_view(), name='api_v2_mission_set_urgent'),
    path('mission-replies/<int:reply_id>/reject/', MissionReplyRejectView.as_view(), name='api_v2_mission_reply_reject'),
    path('mes/device-categories/', DeviceCategoryListCreateView.as_view(), name='api_v2_mes_device_category_list_create'),
    path('mes/device-categories/<int:category_id>/', DeviceCategoryDetailView.as_view(), name='api_v2_mes_device_category_detail'),
    path('mes/devices/', DeviceListCreateView.as_view(), name='api_v2_mes_device_list_create'),
    path('mes/devices/<int:device_id>/', DeviceDetailView.as_view(), name='api_v2_mes_device_detail'),
    path('mes/production-assignments/', ProductionAssignmentListCreateView.as_view(), name='api_v2_mes_production_assignment_list_create'),
    path('mes/production-assignments/<int:assignment_id>/', ProductionAssignmentDetailView.as_view(), name='api_v2_mes_production_assignment_detail'),
    path('shipment-delivery-photos/', ShipmentDeliveryPhotoListCreateView.as_view(), name='api_v2_shipment_delivery_photo_list_create'),
    path('shipment-delivery-photos/<int:photo_id>/', ShipmentDeliveryPhotoDetailView.as_view(), name='api_v2_shipment_delivery_photo_detail'),
    path('cost-categories/', CostCategoryListCreateView.as_view(), name='api_v2_cost_category_list_create'),
    path('cost-categories/<int:category_id>/', CostCategoryDetailView.as_view(), name='api_v2_cost_category_detail'),
    path('cost-entries/', CostEntryListCreateView.as_view(), name='api_v2_cost_entry_list_create'),
    path('cost-entries/<int:entry_id>/', CostEntryDetailView.as_view(), name='api_v2_cost_entry_detail'),
    path('cost-summary/by-category/', CostSummaryByCategoryView.as_view(), name='api_v2_cost_summary_by_category'),
    path('wecom/binduser/', WecomBindingView.as_view(), name='api_v2_wecom_binduser'),
    path('wecom/login/', WecomLoginView.as_view(), name='api_v2_wecom_login'),
]
