This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//question model | |
const mongoose = require('mongoose'); | |
const questionSchema = mongoose.Schema({ | |
_id: mongoose.Schema.Types.ObjectId, | |
createdOn: { type: Date, default: Date.Now }, | |
createdBy: { type: String, ref: 'User' }, // represents the user asking the question | |
meetup: { type: mongoose.Schema.Types.ObjectId, ref: 'Meetup', required: true }, // represents the meetup the question is for |