Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

user.model.js 599B

123456789101112131415161718192021
  1. const mongoose = require('mongoose');
  2. const UserSchema = mongoose.Schema({
  3. // _id: { type: String },
  4. name: { type: String, required: true },
  5. pwd: { type: String },
  6. // hash: { type: String },
  7. // salt: { type: String },
  8. // type: { type: String },
  9. roles: { type: [String], required: true },
  10. tags: { type: [String] },
  11. // deactivated: { type: Boolean },
  12. // participating: { type: [String] },
  13. // host: { type: Boolean },
  14. bookmarks: { type: [String] },
  15. });
  16. //tags as index:
  17. //UserSchema.index({tags:'text'});
  18. module.exports = mongoose.model('User', UserSchema);