import express from "express";
import {
	getAllDoctors,
	createDoctor,
	updateDoctor,
	deleteDoctor,
	getDoctorTimings,
	getDoctorTimingById,
	getDoctorByDoctorId,
	getDoctorsByDepartmentId,
} from "../controllers/doctor.controller.js";

import jwtAuthMiddleware from "../middleware/auth.js";

const router = express.Router();

router.get("/getAll", getAllDoctors);
router.get("/search", getDoctorsByDepartmentId);
router.get("/getTimings", getDoctorTimings);
router.get("/getTimings/:doctorId", getDoctorTimingById);
router.get("/:doctorId", getDoctorByDoctorId);

router.post("/", jwtAuthMiddleware, createDoctor);
router.patch("/:doctorId", jwtAuthMiddleware, updateDoctor);
router.delete("/:doctorId", jwtAuthMiddleware, deleteDoctor);

export default router;
