added article

This commit is contained in:
2013-01-16 20:44:56 -05:00
parent ef1226aef6
commit a899234e21
44 changed files with 16300 additions and 20 deletions

View File

@@ -0,0 +1,20 @@
var Schema = require('mongoose').Schema;
var ArticleSchema = new Schema({
title: {
type: String,
unique: true
},
body: String,
author: {
type: Schema.ObjectId,
ref: 'User',
required: true
},
created_at: {
type: Date,
'default': Date.now
}
});
module.exports = ArticleSchema;