a guest Dec 6th, 2016 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const User = new Schema({
  2.     name:  String,
  3.     surname: String,
  4.     avatar:{ type: String, default: '/images/avatars/no-avatar_jpg.jpg' },
  5.     email:  String,
  6.     tel: String,
  7.     skype: String,
  8.     password: String,
  9.     tasks: [{type: Schema.Types.ObjectId, ref: 'Task'}],
  10.     projects: [{type: Schema.Types.ObjectId, ref: 'Project'}]
  11. });
  13. const Project = new Schema({
  14.     owner_id: {type: Schema.Types.ObjectId, ref: 'User'},
  15.     name: String,
  16.     cover: {type: String, default: '/images/dc.png'},
  17.     dateOfcreation: {type: Date, default:},
  18.     description: String,
  19.     tasks: [{type: Schema.Types.ObjectId, ref: 'Task'}],
  20.     users: [{type: Schema.Types.ObjectId, ref: 'User'}]
  21. });
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