Last active
June 16, 2020 17:57
-
-
Save g00dv1n/092e528491f51eed7a4a20f7d7bd2a58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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