Last active
September 5, 2019 07:28
-
-
Save prashanth-sams/19cea791ea26fdc6ef41c543db566e90 to your computer and use it in GitHub Desktop.
Single model mongoose
This file contains hidden or 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
"use strict"; | |
const mongoose = require('mongoose'); | |
const Schema = mongoose.Schema; | |
// Define collection and schema for Manager | |
let Manager = new Schema({ | |
tag_name: [{ | |
type: String | |
}], | |
book_name: { | |
type: String | |
}, | |
chapter_number: { | |
type: Number | |
}, | |
verse_number: { | |
type: String | |
}, | |
verse_context: { | |
type: String | |
} | |
},{ | |
collection: 'manager' | |
}); | |
module.exports = mongoose.model('Manager', Manager); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment