# coding=utf-8

from django.conf.urls import url, include
from rest_framework.routers import SimpleRouter

from .views import *

urlpatterns = [
    url(r'^code2Session/$', WxLoginView.as_view()),
    url(r'^wxbind/$', WxBindView.as_view()),
    url(r'^setUserInfo/$', SetUserInfoView.as_view()),
    url(r'^token/refresh/$', CustomerRefreshTokenView),
    url(r'^token/verify/$', CustomerVerifyTokenView),

    url(r'^home/$', CustomerHomeView.as_view()),

    url(r'^address/', include('apps.customer.address.urls')),
    url(r'^commodity/', include('apps.customer.commodity.urls')),
    url(r'^collection/', include('apps.customer.collection.urls')),
    url(r'^distributor/', include('apps.customer.distributor.urls')),
    url(r'^order/', include('apps.customer.order.urls')),
    url(r'^rebate/', include('apps.customer.rebate.urls')),
]

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