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

1234567891011121314
  1. const mongoose = require('mongoose');
  2. const UserSchema = mongoose.Schema({
  3. name: { type: String, required: true },
  4. password: {type: String}, 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);