split services / delete dish / mail init
This commit is contained in:
@@ -2,6 +2,7 @@ import mongoose from "mongoose";
|
||||
|
||||
const dishSchema = mongoose.Schema({
|
||||
_id: mongoose.Types.ObjectId,
|
||||
restaurantId: mongoose.Types.ObjectId,
|
||||
name: {
|
||||
type: String,
|
||||
maxlength: 128,
|
||||
@@ -36,7 +37,7 @@ const dishSchema = mongoose.Schema({
|
||||
sesame: Boolean,
|
||||
},
|
||||
ingredients: {
|
||||
type: Array,
|
||||
type: [String],
|
||||
},
|
||||
vegan: Boolean,
|
||||
vegetarian: Boolean,
|
||||
|
||||
@@ -12,6 +12,22 @@ const restaurantSchema = mongoose.Schema({
|
||||
maxlength: 128,
|
||||
required: true,
|
||||
},
|
||||
adress: {
|
||||
type: String,
|
||||
maxlength: 128,
|
||||
required: true,
|
||||
},
|
||||
location: {
|
||||
type: {
|
||||
type: String,
|
||||
enum: ["Point"],
|
||||
required: true,
|
||||
},
|
||||
coordinates: {
|
||||
type: [Number],
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
imgUrl: {
|
||||
type: String,
|
||||
required: true,
|
||||
|
||||
Reference in New Issue
Block a user