# reports/urls.py
from django.urls import path
from . import views

app_name = 'reports'

urlpatterns = [
    # Academic Reports
    path('academic/', views.AcademicReportView.as_view(), name='academic_report'),
    path('academic/class/<int:class_id>/', views.ClassReportView.as_view(), name='class_report'),
    path('academic/student/<int:pk>/', views.StudentReportView.as_view(), name='student_report'),
    path('academic/generate/', views.generate_academic_report, name='generate_academic_report'),    
    # Attendance Reports
    path('attendance/', views.AttendanceReportView.as_view(), name='attendance_report'),
    path('attendance/class/<int:class_id>/', views.ClassAttendanceReportView.as_view(), name='class_attendance_report'),
    path('attendance/export/', views.export_attendance_report, name='export_attendance_report'),    
    # Financial Reports
    path('financial/', views.FinancialReportView.as_view(), name='financial_report'),
    path('financial/term/<int:term>/', views.TermFinancialReportView.as_view(), name='term_financial_report'),
    path('financial/year/<str:year>/', views.YearlyFinancialReportView.as_view(), name='yearly_financial_report'),
    path('financial/export/', views.export_financial_report, name='export_financial_report'),    
    # Custom Reports
    path('custom/', views.CustomReportView.as_view(), name='custom_report'),
    path('custom/generate/', views.generate_custom_report, name='generate_custom_report'),    
    # Exports
    path('export/pdf/<str:report_type>/<int:report_id>/', views.export_report_pdf, name='export_report_pdf'),
    path('export/excel/<str:report_type>/<int:report_id>/', views.export_report_excel, name='export_report_excel'),
]