const mongoose = require('mongoose'); const HomePageSchema = mongoose.Schema({ s2: {type: mongoose.Schema.Types.ObjectId, ref: 'Category', default: null}, s3: {type: mongoose.Schema.Types.ObjectId, ref: 'Category', default: null}, s4: {type: mongoose.Schema.Types.ObjectId, ref: 'Category', default: null}, s5: [{type: mongoose.Schema.Types.ObjectId, ref: 'Category', default: null}], s6: {type: mongoose.Schema.Types.ObjectId, ref: 'Category', default: null}, // side bar s2Side: {type: mongoose.Schema.Types.ObjectId, ref: 'Category', default: null}, s3Side: {type: mongoose.Schema.Types.ObjectId, ref: 'Category', default: null}, s4Side: {type: mongoose.Schema.Types.ObjectId, ref: 'Category', default: null}, s5Side: {type: mongoose.Schema.Types.ObjectId, ref: 'Category', default: null}, s6Side: {type: mongoose.Schema.Types.ObjectId, ref: 'Category', default: null}, modelType : String }); module.exports = mongoose.model('HomePage', HomePageSchema);