This commit is contained in:
Harikrishnan Gopal
2024-12-17 11:21:25 +05:30
parent ce73a591c5
commit b4adca13c7
7 changed files with 702 additions and 461 deletions

View File

@@ -1,11 +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
facultyId: { type: String, required: true },
facultyName: { type: String, required: true },
courseId: { type: String, required: true },
courseName: { type: String, required: true },
task: { type: String, required: true },
});
module.exports = mongoose.model("Appointment", AppointmentSchema);