from django.urls import path,include
from .views import CompanyViewSet, \
ConsumerViewSet, ConsumerMPLoginView, ConsumerRegister, MsgViewSet, WxphoneRegister, change_remain_count, ConsumerPermViewSet, ConsumerRoleViewSet, candidate, CandidateViewSet
from rest_framework import routers


router = routers.DefaultRouter()
router.register('consumer', ConsumerViewSet, basename="consumer")
router.register('company', CompanyViewSet, basename="company")
router.register('consumerrole', ConsumerRoleViewSet, basename="consumerrole")
router.register('consumerperm', ConsumerPermViewSet, basename="consumerperm")
router.register('candidate', CandidateViewSet, basename="candidate")
router.register('msg', MsgViewSet, basename="msg")
urlpatterns = [
    path('consumer/mplogin/', ConsumerMPLoginView.as_view()),
    path('consumer/register/', ConsumerRegister.as_view()),
    path('consumer/wxphoneregister/', WxphoneRegister.as_view()),
    path('change_remain_count/', change_remain_count.as_view()),
    path('candidate/img/',candidate),
    path('', include(router.urls)),
]
