I want to modify Mongoose schema for order management system. How to update my schema which can be make possible to order multiple foods for same customer(from one post request).
ex - customer1 wants to order - 2 Fried-rice and 1 pizza`
`const OrderSchema = new Schema({
cusName:{
type:String,
required:[true,'must provide name'],
trim:true,
maxlength:[20,'name can not be more than 20 charectors']
},
foodName:{
type:String,
required:[true,'must provide name'],
trim:true,
maxlength:[20,'name can not be more than 20 charectors']
},
quntity:{
type:Number,
required:[true,'must provide name'],
trim:true,
},
orderTime:{
type:Number,
required:[true,'must provide name'],
trim:true,
}
});
`