Advertisement
Ludwiq

Untitled

Feb 14th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict';
  2.  
  3. var mongoose = require('mongoose'),
  4.     Schema = mongoose.Schema;
  5.  
  6. var TagSchema = new Schema({
  7.     name: String,
  8.     connectedNotes: [{type: Schema.Types.ObjectId, ref: 'Note'}],
  9. });
  10.  
  11. module.exports = mongoose.model('Tag', TagSchema);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement