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

from .views import *

urlpatterns = [
    url(r'^deleteProductImage/$', DeleteProductImageView.as_view()),
    url(r'productDict/$', ProductView.as_view()),
    url(r'productList/$', ProductListView.as_view()), # 小程序首页，获取产品列表
    url(r'list/$', OrderListView.as_view()),
    url(r'new/$', OrderCreatView.as_view()), # 匿名用户申报
    url(r'newUpload/$', OrderUploadView.as_view()), # 匿名用户上传图片
    url(r'deleteImg/$', OrderDeleteImgView.as_view()), # 匿名用户删除图片
]

router = SimpleRouter()
router.register(r'product', ProductViewSet)
router.register(r'', OrderViewSet)
urlpatterns += router.urls
