const mongoose = require('mongoose');
const { Schema } = mongoose;
const contentSchema = new Schema({
page: {
type: String,
enum: ['home','about','contact'],
required: true
},
name: {
type: String,
required: true
},
imageUrl: {
type: String
},
title: {
type: String
},
heading: {
type: String
},
subheading: [{
type: String
}],
paragraph: [{
type: String
}],
listItem: [{
type: String
}],
tagline: {
type: String
},
link: new Schema({
text: {
type: String
},
link: {
type: String
}
})
}, { timestamps: true });
const Content = mongoose.model('content', contentSchema)
module.exports = Content;