diff --git a/README.md b/README.md index 43d8444..765fb28 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ - ##### **lunchMenu**: - ##### **lunchSetName**: _String_ - ##### **lunchSetPrice**: _String_ - - ##### **lunchSetDishes**: [mongoose.Types.ObjectId] + - ##### **lunchSetDishes**: [{ dishId: mongoose.Types.ObjectId, quantity: String }] - ##### **dishes**: [*mongoose.Types.ObjectId*]
diff --git a/models/payments.js b/models/payments.js deleted file mode 100644 index 57e3c39..0000000 --- a/models/payments.js +++ /dev/null @@ -1,10 +0,0 @@ -const mongoose = require("mongoose"); - -const paymentSchema = mongoose.Schema({ - _id: mongoose.Types.ObjectId, - restaurantId: mongoose.Types.ObjectId, - amount: Number, - months: Number, -}); - -module.exorts = mongoose.model("Payment", paymentSchema); diff --git a/models/restaurant.js b/models/restaurant.js index 0b9e3f1..d9103cc 100644 --- a/models/restaurant.js +++ b/models/restaurant.js @@ -70,7 +70,10 @@ const restaurantSchema = mongoose.Schema({ { lunchSetName: String, lunchSetPrice: String, - lunchSetDishes: [mongoose.Types.ObjectId], + lunchSetDishes: [{ + dishId: mongoose.Types.ObjectId, + quantity: String + }], }, ], dishes: [mongoose.Types.ObjectId],