Skip to content

Commit

Permalink
refactor : removed explicit declaration of _id field from Mongoose sc…
Browse files Browse the repository at this point in the history
…hemas
  • Loading branch information
ad956 committed Jul 3, 2024
1 parent faf0259 commit b1d56ef
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion app/models/bookedAppointment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export interface BookedAppointment extends mongoose.Document {

const bookedAppointmentsSchema = new mongoose.Schema(
{
_id: { type: mongoose.Schema.Types.ObjectId, required: true },
date: { type: Date, required: true },
timing: { type: String, required: false },
state: { type: String, required: true },
Expand Down
1 change: 0 additions & 1 deletion app/models/commonDisease.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export interface CommonDiseases extends mongoose.Document {

const diseaseSchema = new mongoose.Schema(
{
_id: { type: mongoose.Schema.Types.ObjectId, required: true },
commonDiseases: [String],
},
{
Expand Down
1 change: 0 additions & 1 deletion app/models/doctor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const addressSchema = new mongoose.Schema({

const doctorSchema = new mongoose.Schema(
{
_id: { type: mongoose.Schema.Types.ObjectId, required: true },
firstname: {
type: String,
required: true,
Expand Down
1 change: 0 additions & 1 deletion app/models/hospital.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export interface Hospital extends mongoose.Document {

const hospitalSchema = new mongoose.Schema(
{
_id: { type: mongoose.Schema.Types.ObjectId, required: true },
firstname: {
type: String,
required: true,
Expand Down
1 change: 0 additions & 1 deletion app/models/medicalHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export interface MedicalHistory extends mongoose.Document {

const medicalHistorySchema = new mongoose.Schema(
{
_id: { type: mongoose.Schema.Types.ObjectId, required: true },
hospital: {
type: mongoose.Schema.Types.ObjectId,
ref: "Hospital",
Expand Down

0 comments on commit b1d56ef

Please sign in to comment.