Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. var mongoose = require('mongoose'),
  2. Schema = mongoose.Schema,
  3. User = require('./UserSchema');
  4.  
  5. var FriendsSchema = new Schema({
  6. users : [User.ObjectId],
  7. confirmed : { type: Boolean, default: false, index: true },
  8.  
  9. created : {type: Date, default: Date.now},
  10.  
  11. });
  12. FriendsSchema.index({users: 1}, {unique:true}); // Fine, ensures we only have one of these relations
  13. module.exports = FriendsSchema;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement