const express = require('express'); const router = express.Router(); const teacherController = require('../controllers/teacherController'); /** * Teacher Routes */ // Get teacher datatypes (must be before /:id route) router.get('/datatypes/schema', teacherController.getTeacherDatatypes); // Get all teachers with pagination router.get('/', teacherController.getAllTeachers); // Get teacher by ID router.get('/:id', teacherController.getTeacherById); // Create new teacher router.post('/', teacherController.createTeacher); // Update teacher router.put('/:id', teacherController.updateTeacher); // Update teacher profile (separate endpoint for user self-update) router.put('/:id/profile', teacherController.updateTeacherProfile); // Delete teacher (update status to resigned) router.delete('/:id', teacherController.deleteTeacher); module.exports = router;