from django.conf.urls import url
from rest_framework.routers import SimpleRouter
from apps.account.views import *

urlpatterns = [
    url(r'^login/$', LoginView.as_view()),
    url(r'^token_refresh/$', RefreshTokenView.as_view()),

    url(r'^permission/dict/$', PermissionDictView.as_view()), # 人员管理，编辑，权限组
    url(r'^permission/all/$', PermissionsListView.as_view()), # 权限管理，编辑，加载所有权限
    url(r'^store/tree/$', StoreTreeView.as_view()), # 人员管理，管理门店，加载门店
]

router = SimpleRouter()
router.register(r'employee', EmployeeViewSet)
router.register(r'permission', GroupsViewSet)
urlpatterns += router.urls
