Added backend and integration for FilterPage and CourseTable done

This commit is contained in:
Harshitha Shetty
2024-12-09 05:06:08 +05:30
parent 6b06b9722f
commit e22727eefd
16 changed files with 756 additions and 118 deletions

View File

@@ -0,0 +1,11 @@
const mongoose = require("mongoose");
const { v4: uuidv4 } = require("uuid"); // For UUID generation
const AppointmentSchema = new mongoose.Schema({
appointmentId: { type: String, default: uuidv4 }, // Auto-generate using UUID
courseId: { type: String, required: true, ref: "Course" },
facultyId: { type: String, required: true, ref: "Faculty" },
appointmentType: { type: [String], required: true }, // Array of appointment types
});
module.exports = mongoose.model("Appointment", AppointmentSchema);