Adding a draft for models.

This commit is contained in:
gaba
2016-11-01 13:35:09 -07:00
parent 98e0a404eb
commit d80b3bc27f
3 changed files with 60 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var userSchema = new Schema({
name: String,
created_at: { type: Date, default: Date.now },
updated_at: { type: Date, default: Date.now }
});
var User = mongoose.model('User', userSchema);
module.exports = User;