Last active
August 29, 2015 14:27
-
-
Save ebourmalo/11bc914a9a460722a815 to your computer and use it in GitHub Desktop.
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
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
var questionSchema = new Schema({ | |
description: {type: String, required: true}, | |
author: {type: Schema.Types.ObjectId, ref: 'user', required: true}, | |
tags: Array, | |
fileId: String, | |
createdAt: {type: Date, default: Date.now}, | |
lastActivityAt: {type: Date, default: Date.now} | |
})); | |
var Question = mongoose.model('question', questionSchema); | |
module.exports = Question; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment