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

1234567891011121314
  1. const mongoose = require('mongoose');
  2. //const Schema = mongoose.Schema,
  3. //ObjectId = Schema.ObjectId;
  4. const MessageSchema = mongoose.Schema({
  5. subject: { type: String, required: true },
  6. message: { type: String, required: true },
  7. user: { type: String, required: true },
  8. tag: [{type: String, index: true }],
  9. //createtime: { type: Date, default: Date.now },
  10. });
  11. module.exports = mongoose.model('Message', MessageSchema);