Answer the question
In order to leave comments, you need to log in
How to get a given element from the database by ID?
Good afternoon, there is such a scheme for a collection of restaurants
const PointSchema = new mongoose.Schema({
name: { type: String, required: true },
})
const RestaurantSchema = new mongoose.Schema({
name: {
type: String,
require: true
},
description: {
type: String,
default: ""
},
image: {
type: String,
},
rating: {
type: String
},
sale: {
type: String,
},
time: {
type: String
},
minPrice: {
type: String,
},
priceRange: {
type: String
},
categories: [],
points: [PointSchema]
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question