Skip to content

Instantly share code, notes, and snippets.

@prashanth-sams
Last active September 5, 2019 07:28
Show Gist options
  • Save prashanth-sams/19cea791ea26fdc6ef41c543db566e90 to your computer and use it in GitHub Desktop.
Save prashanth-sams/19cea791ea26fdc6ef41c543db566e90 to your computer and use it in GitHub Desktop.
Single model mongoose
"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