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.

12 lines
291 B

  1. var mongoose = require('mongoose'),
  2. Schema = mongoose.Schema;
  3. var commentSchema = new Schema({
  4. comment: { type: String },
  5. user: {
  6. type: mongoose.Schema.Types.ObjectId,
  7. ref: 'userModel'
  8. }
  9. });
  10. module.exports = mongoose.model('commentModel', commentSchema);