SHARE
TWEET

Untitled

a guest Sep 16th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "use strict";
  2. const mongoose = require('mongoose');
  3. const Schema = mongoose.Schema;
  4.  
  5. // Define collection and schema for Manager
  6. var Manager = new Schema({
  7.   tag_name: [{
  8.     type: String
  9.   }],
  10.   book_name: {
  11.     type: String
  12.   },
  13.   chapter_number: {
  14.     type: Number
  15.   },
  16.   verse_number: {
  17.     type: String
  18.   },
  19.   verse_context: {
  20.     type: String
  21.   }
  22. },{
  23.     collection: 'manager'
  24. });
  25.  
  26. // Define collection and schema for Question
  27. var Question = new Schema({
  28.   query_text: {
  29.     type: String
  30.   },
  31.   tag_name: [{
  32.     type: String
  33.   }],
  34.   book_name: {
  35.     type: String
  36.   },
  37.   chapter_number: {
  38.     type: Number
  39.   },
  40.   verse_number: {
  41.     type: String
  42.   },
  43.   verse_context: {
  44.     type: String
  45.   }
  46. },{
  47.     collection: 'manager'
  48. });
  49.  
  50. const managerSchema = mongoose.model('Manager', Manager);
  51. const questionSchema = mongoose.model('Question', Question);
  52.  
  53. module.exports = { Manager: managerSchema, Question: questionSchema }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top