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 332B

12345678910111213
  1. const mongoose = require('mongoose');
  2. const UserSchema = mongoose.Schema({
  3. name: { type: String, required: true },
  4. password: {type: String},
  5. role: {type: String, required: true},
  6. tags: [{type: String }],
  7. });
  8. //tags as index:
  9. //UserSchema.index({tags:'text'});
  10. module.exports = mongoose.model('User', UserSchema);