Skip to content

Instantly share code, notes, and snippets.

@g00dv1n
Last active June 16, 2020 17:57
Show Gist options
  • Save g00dv1n/092e528491f51eed7a4a20f7d7bd2a58 to your computer and use it in GitHub Desktop.
Save g00dv1n/092e528491f51eed7a4a20f7d7bd2a58 to your computer and use it in GitHub Desktop.
const pageScheme = new mongoose.Schema({
pageTitle: {
type: String
},
pageMetaDescription: {
type: String
}
}, { _id: false })
const productScheme = new mongoose.Schema({
productTitle: {
type: String
},
productDescription: {
type: String
},
productPrice: {
type: String
}
}, { _id: false })
//----------------------------------------------------
const fieldSchema = new mongoose.Schema({
name: {
type: String,
required: true
},
type: {
type: String,
enum: fieldTypesArray, // file, text, link, price
required: true
},
default: {
type: String
},
screen: {
type: Number
},
description: {
type: String
}
}, { _id: false })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment