naming convention

This commit is contained in:
Amra Šabić
2018-02-18 13:36:42 +01:00
parent 36a4fb4272
commit 419993262d
3 changed files with 12 additions and 16 deletions

View File

@@ -3,19 +3,14 @@
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var UserSchema = new Schema({
var userSchema = new Schema({
// TODO additional fields may be added
username: {
type: String,
required: 'Name'
},
email: {
type: String
},
username: String,
email: String,
Created_date: {
type: Date,
default: Date.now
}
});
module.exports = mongoose.model('User', UserSchema);
module.exports = mongoose.model('User', userSchema);