const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const schema = new Schema ({
  username: {
    type: String,
    required: true
  },
  password: {
    type: String,
    required: true
  },
  fridge: {
    type: Schema.Types.ObjectId,
    ref: 'fridge'
  },
  meals: [{
    type: Schema.Types.ObjectId,
    ref: 'meal'
  }],
  favorites: [{
    type: Schema.Types.ObjectId,
    ref: 'meal'
  }]
});

module.exports = mongoose.model('user', schema);
@@ -205,16 +205,97 @@
 ue%0A  %7D,%0A
+  role: %7B%0A    type: String,%0A    enum: %5B'admin', 'user'%5D,%0A    required: true%0A  %7D,%0A
   fridge

add roles to user