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.

message.model.js 562B

1234567891011121314151617181920
  1. const mongoose = require('mongoose');
  2. //const Schema = mongoose.Schema,
  3. //ObjectId = Schema.ObjectId;
  4. const MessageSchema = mongoose.Schema({
  5. //_id: ObjectId,
  6. /*id: {
  7. type: String,
  8. getter: function(val) { return this._id.toString(); },
  9. unique: true
  10. },*/
  11. //id: {type: String, required: true},
  12. subject: { type: String, required: true },
  13. message: { type: String, required: true },
  14. user: { type: String, required: true },
  15. tag: {type: String },
  16. });
  17. module.exports = mongoose.model('Message', MessageSchema);