from django.db.models import base
from django.urls import path, include
from rest_framework import routers

from apps.ability.views_qtask import QActionViewSet, QOrgViewSet, QTaskViewSet, QualiLibViewSet, QualiViewSet
from .views import AbilityContentViewSet, AbilityRecordViewSet, CMAViewSet, CNASViewSet, CorrectViewSet, QualificationViewSet,InspectionViewSet,QualificationotherViewSet, QueryRecordListViewSet, correct_ability, correct_cma, merge_cma, merge_cnas

router = routers.DefaultRouter()
router.register('cma', CMAViewSet, basename="cma")
router.register('cnas', CNASViewSet, basename="cnas")
router.register('qualification', QualificationViewSet, basename="qualification")
router.register('qualificationother', QualificationotherViewSet, basename="qualificationother")
router.register('inspection', InspectionViewSet, basename="inspection")
router.register('queryrecord', QueryRecordListViewSet, basename="queryrecord")
router.register('correct', CorrectViewSet, basename="correct")
router.register('content', AbilityContentViewSet, basename="abilitycontent")
router.register('record', AbilityRecordViewSet, basename="abilityrecord")
router.register('qualilib', QualiLibViewSet),
router.register('quali', QualiViewSet),
router.register('qorg', QOrgViewSet),
router.register('qtask', QTaskViewSet),
router.register('qaction', QActionViewSet)
urlpatterns = [
    path('merge/cma/', merge_cma),
    path('merge/cnas/', merge_cnas),
    path('correct_cma/', correct_cma),
    path('', include(router.urls))
]