from django.urls import path, include
from rest_framework import routers
from django.conf.urls import url
from app.applicationlayer.master.Account.views import AdminAccountViewSet
from app.applicationlayer.master.company.views import AdminCompanyViewSet
from app.applicationlayer.master.department.views import AdminDepartmentViewSet
from app.applicationlayer.master.user_type.views import UserTypeViewSet
from app.applicationlayer.master.user_type.views import cronjob
from app.applicationlayer.master.attachment.views import MasterAttachmentViewSet

router = routers.DefaultRouter()
router.register(r'users', AdminAccountViewSet)
router.register(r'companies', AdminCompanyViewSet)
router.register(r'departments', AdminDepartmentViewSet)
router.register(r'attachments', MasterAttachmentViewSet)
# router.register(r'user-types', UserTypeViewSet)

urlpatterns = [
    path('', include(router.urls)),
    url(r'^user-types/$', UserTypeViewSet.as_view(), name="user-types"),
    url(r'^cronjob/$', cronjob.as_view(), name="user-types"),
]