changes in data models

This commit is contained in:
2022-07-21 18:16:33 +02:00
parent b58acdc0c9
commit 0db1d5117e
3 changed files with 23 additions and 74 deletions

View File

@@ -22,8 +22,8 @@ const dishSchema = mongoose.Schema({
price: {
type: String,
maxlength: 20,
required: true
}
required: true,
},
},
price2: {
priceName: {
@@ -33,7 +33,7 @@ const dishSchema = mongoose.Schema({
price: {
type: String,
maxlength: 20,
}
},
},
price3: {
priceName: {
@@ -43,8 +43,8 @@ const dishSchema = mongoose.Schema({
price: {
type: String,
maxlength: 20,
}
}
},
},
},
notes: {
type: String,
@@ -70,14 +70,6 @@ const dishSchema = mongoose.Schema({
kCal: String,
vegan: Boolean,
vegetarian: Boolean,
photos: [mongoose.Types.ObjectId],
ratings: [
{
id: mongoose.Types.ObjectId,
rate: Number,
owner: mongoose.Types.ObjectId
}
]
});
module.exports = mongoose.model("Dish", dishSchema);