Created
July 3, 2020 19:36
-
-
Save konami12/21560c7089acb44e68f676669d4d233c to your computer and use it in GitHub Desktop.
Schema para mongoose
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
//importamos las dependencia mongoose | |
const { Schema, model } = require("mongoose"); | |
// Segenera el esquema base | |
const SCHEMA = new Schema({ | |
name: { type: String, require: true }, | |
lastName: String, | |
age: Number, | |
random: Number, | |
}); | |
// exportamon el schema generado | |
exports.agenda = model("agenda", SCHEMA); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment