Skip to content

Instantly share code, notes, and snippets.

View jhony112's full-sized avatar

Jhony Babs jhony112

View GitHub Profile
@jhony112
jhony112 / question.js
Last active November 27, 2019 08:59 — forked from sunnexy/question.js
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
title: { type: String },
bodyMessage: { type: String },