from django.urls import path, re_path

from .views import (
    TeacherListCreateView, TeacherDetailView,
    SpecialityListCreateView, SpecialityDetailView,
    SchoolClassListCreateView, SchoolClassDetailView,
    PlanningListCreateView, PlanningDetailView,
    FeeListCreateView, FeeDetailView,
    DiscountListCreateView, DiscountDetailView,
    PaymentPlanListCreateView, PaymentPlanDetailView,
    PaymentModeListCreateView, PaymentModeDetailView,
    CompetencyListCreateView, CompetencyDetailView,
    EstablishmentCompetencyListCreateView, EstablishmentCompetencyDetailView,
    EvaluationListCreateView, EvaluationDetailView,
    StudentEvaluationListView, StudentEvaluationBulkUpdateView, StudentEvaluationDetailView,
    SchoolYearsListView,
)

urlpatterns = [
    re_path(r'^specialities$', SpecialityListCreateView.as_view(), name="speciality_list_create"),
    re_path(r'^specialities/(?P<id>[0-9]+)$', SpecialityDetailView.as_view(), name="speciality_detail"),

    re_path(r'^teachers$', TeacherListCreateView.as_view(), name="teacher_list_create"),
    re_path(r'^teachers/(?P<id>[0-9]+)', TeacherDetailView.as_view(), name="teacher_detail"),

    re_path(r'^schoolClasses$', SchoolClassListCreateView.as_view(), name="school_class_list_create"),
    re_path(r'^schoolClasses/(?P<id>[0-9]+)', SchoolClassDetailView.as_view(), name="school_class_detail"),

    re_path(r'^plannings$', PlanningListCreateView.as_view(), name="planninglist_create"),
    re_path(r'^plannings/(?P<id>[0-9]+)$', PlanningDetailView.as_view(), name="planning_detail"),

    re_path(r'^fees$', FeeListCreateView.as_view(), name="fee_list_create"),
    re_path(r'^fees/(?P<id>[0-9]+)$', FeeDetailView.as_view(), name="fee_detail"),

    re_path(r'^discounts$', DiscountListCreateView.as_view(), name="discount_list_create"),
    re_path(r'^discounts/(?P<id>[0-9]+)$', DiscountDetailView.as_view(), name="discount_detail"),

    re_path(r'^paymentPlans$', PaymentPlanListCreateView.as_view(), name="payment_plan_list_create"),
    re_path(r'^paymentPlans/(?P<id>[0-9]+)$', PaymentPlanDetailView.as_view(), name="payment_plan_detail"),

    re_path(r'^paymentModes$', PaymentModeListCreateView.as_view(), name="payment_mode_list_create"),
    re_path(r'^paymentModes/(?P<id>[0-9]+)$', PaymentModeDetailView.as_view(), name="payment_mode_detail"),

    re_path(r'^competencies$', CompetencyListCreateView.as_view(), name="competency_list_create"),
    re_path(r'^competencies/(?P<id>[0-9]+)$', CompetencyDetailView.as_view(), name="competency_detail"),

    re_path(r'^establishmentCompetencies$', EstablishmentCompetencyListCreateView.as_view(), name="establishment_competency_list_create"),
    re_path(r'^establishmentCompetencies/(?P<id>[0-9]+)$', EstablishmentCompetencyDetailView.as_view(), name="establishment_competency_detail"),

    # Evaluations
    re_path(r'^evaluations$', EvaluationListCreateView.as_view(), name="evaluation_list_create"),
    re_path(r'^evaluations/(?P<id>[0-9]+)$', EvaluationDetailView.as_view(), name="evaluation_detail"),

    # Student Evaluations
    re_path(r'^studentEvaluations$', StudentEvaluationListView.as_view(), name="student_evaluation_list"),
    re_path(r'^studentEvaluations/bulk$', StudentEvaluationBulkUpdateView.as_view(), name="student_evaluation_bulk"),
    re_path(r'^studentEvaluations/(?P<id>[0-9]+)$', StudentEvaluationDetailView.as_view(), name="student_evaluation_detail"),

    # History / School Years
    re_path(r'^schoolYears$', SchoolYearsListView.as_view(), name="school_years_list"),
]