Message.js 255 B

123456789
  1. const {model, Schema} = require('mongoose');
  2. const Message = new Schema({
  3. text: {type: String, required: true},
  4. userName : {type: String, required: true},
  5. createDate: {type: Date, required: true}
  6. })
  7. module.exports = model('Message', Message)