changes in data models
This commit is contained in:
@@ -31,50 +31,50 @@ const restaurantSchema = mongoose.Schema({
|
||||
type: {
|
||||
type: String,
|
||||
maxlength: 64,
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
placesId: {
|
||||
type: String,
|
||||
maxlength: 128
|
||||
maxlength: 128,
|
||||
},
|
||||
imgUrl: {
|
||||
type: String,
|
||||
maxlength: 128,
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
workingHours: {
|
||||
pn: {
|
||||
type: String,
|
||||
maxlength: 24
|
||||
maxlength: 24,
|
||||
},
|
||||
wt: {
|
||||
type: String,
|
||||
maxlength: 24
|
||||
maxlength: 24,
|
||||
},
|
||||
sr: {
|
||||
type: String,
|
||||
maxlength: 24
|
||||
maxlength: 24,
|
||||
},
|
||||
cz: {
|
||||
type: String,
|
||||
maxlength: 24
|
||||
maxlength: 24,
|
||||
},
|
||||
pt: {
|
||||
type: String,
|
||||
maxlength: 24
|
||||
maxlength: 24,
|
||||
},
|
||||
sb: {
|
||||
type: String,
|
||||
maxlength: 24
|
||||
maxlength: 24,
|
||||
},
|
||||
nd: {
|
||||
type: String,
|
||||
maxlength: 24
|
||||
maxlength: 24,
|
||||
},
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
maxlength: 400
|
||||
maxlength: 400,
|
||||
},
|
||||
tags: {
|
||||
cardPayments: Boolean,
|
||||
@@ -88,49 +88,25 @@ const restaurantSchema = mongoose.Schema({
|
||||
links: {
|
||||
facebook: {
|
||||
type: String,
|
||||
maxlength: 128
|
||||
maxlength: 128,
|
||||
},
|
||||
instagram: {
|
||||
type: String,
|
||||
maxlength: 128
|
||||
maxlength: 128,
|
||||
},
|
||||
www: {
|
||||
type: String,
|
||||
maxlength: 128
|
||||
maxlength: 128,
|
||||
},
|
||||
},
|
||||
phone: {
|
||||
type: String,
|
||||
maxlength: 24
|
||||
maxlength: 24,
|
||||
},
|
||||
hidden: Boolean,
|
||||
indexed: Date,
|
||||
categories: [String],
|
||||
lunchHours: {
|
||||
type: String,
|
||||
maxlength: 24
|
||||
},
|
||||
lunchMenu: [
|
||||
{
|
||||
lunchSetName: {
|
||||
type: String,
|
||||
maxlength: 30
|
||||
},
|
||||
lunchSetPrice: Number,
|
||||
lunchSetDishes: [{
|
||||
dishId: mongoose.Types.ObjectId,
|
||||
quantity: Number
|
||||
}],
|
||||
},
|
||||
],
|
||||
dishes: [mongoose.Types.ObjectId],
|
||||
ratings: [
|
||||
{
|
||||
rate: Number,
|
||||
owner: mongoose.Types.ObjectId,
|
||||
id: mongoose.Types.ObjectId
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
module.exports = mongoose.model("Restaurant", restaurantSchema);
|
||||
|
||||
Reference in New Issue
Block a user