# coding=utf-8
from django.conf.urls import url
from rest_framework.routers import SimpleRouter

from .views import RepairOrderViewSet, DispatchRepairOrderView, RepairOrderAllView, RepairOrderDetailView, \
    RepairOrderMineView, RepairOrderCountView

urlpatterns = [
    url(r'^dispatch/$', DispatchRepairOrderView.as_view()),  # 我的派单
    url(r'^all/$', RepairOrderAllView.as_view()),  # 所有派单 通过状态筛选
    url(r'^cout_data/$', RepairOrderCountView.as_view()),  # 所有派单 通过状态筛选
    url(r'^mine/$', RepairOrderMineView.as_view()),  # 我的报修
    url(r'^(?P<pk>[0-9]+)/$', RepairOrderDetailView.as_view()),  # 工单详情 ok
]

router = SimpleRouter()
router.register(r'', RepairOrderViewSet)
urlpatterns += router.urls
