Readme / restaurant model lunch menu changed

This commit is contained in:
2020-12-11 17:41:17 +01:00
parent 609f18291c
commit 976f93588d
3 changed files with 5 additions and 12 deletions

View File

@@ -53,7 +53,7 @@
- ##### **lunchMenu**: - ##### **lunchMenu**:
- ##### **lunchSetName**: _String_ - ##### **lunchSetName**: _String_
- ##### **lunchSetPrice**: _String_ - ##### **lunchSetPrice**: _String_
- ##### **lunchSetDishes**: [mongoose.Types.ObjectId] - ##### **lunchSetDishes**: [{ dishId: mongoose.Types.ObjectId, quantity: String }]
- ##### **dishes**: [*mongoose.Types.ObjectId*] - ##### **dishes**: [*mongoose.Types.ObjectId*]
<br> <br>

View File

@@ -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);

View File

@@ -70,7 +70,10 @@ const restaurantSchema = mongoose.Schema({
{ {
lunchSetName: String, lunchSetName: String,
lunchSetPrice: String, lunchSetPrice: String,
lunchSetDishes: [mongoose.Types.ObjectId], lunchSetDishes: [{
dishId: mongoose.Types.ObjectId,
quantity: String
}],
}, },
], ],
dishes: [mongoose.Types.ObjectId], dishes: [mongoose.Types.ObjectId],