modify userModel properties

This commit is contained in:
Amra Šabić
2018-02-17 18:00:22 +01:00
parent 283634765b
commit a51eb8cb0a
2 changed files with 10 additions and 7 deletions

View File

@@ -4,11 +4,14 @@ var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var UserSchema = new Schema({
// TODO modify later, just for testing
name: {
// TODO additional fields may be added
username: {
type: String,
required: 'Name'
},
email: {
type: String
},
Created_date: {
type: Date,
default: Date.now