Skip to content

Commit

Permalink
updated for appointments
Browse files Browse the repository at this point in the history
  • Loading branch information
Nafeesa-shehzadi committed Jun 1, 2024
1 parent 6d9f372 commit 043caf6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions backend/models/DoctorSchema.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import mongoose from "mongoose";
import mongoose, { Schema } from "mongoose";

const Appointment = new Schema({
patientName: String,
patientGender: { type: String, enum: ["male", "female", "other"] },
payment: String,
price: String,
bookedOn: String,
testName: String,
});

const DoctorSchema = new mongoose.Schema({
email: { type: String, required: true, unique: true },
Expand Down Expand Up @@ -38,7 +47,7 @@ const DoctorSchema = new mongoose.Schema({
enum: ["pending", "approved", "cancelled"],
default: "pending",
},
appointments: [{ type: mongoose.Types.ObjectId, ref: "Appointment" }],
appointments: [Appointment],
});

export default mongoose.model("Doctor", DoctorSchema);

0 comments on commit 043caf6

Please sign in to comment.