pull/1/head
sundowndev 2018-11-12 18:19:13 +01:00
parent 0220fc745a
commit 5282b3c4fa
1 changed files with 19 additions and 5 deletions

View File

@ -1,11 +1,25 @@
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var bcrypt = require('bcrypt-nodejs');
var UserSchema = new Schema({
firstname: String,
lastname: String,
username: String,
password: String
var UserSchema = new Schema({
firstname: {
type: String,
required: true
},
lastname: {
type: String,
required: true
},
username: {
type: String,
unique: true,
required: true
},
password: {
type: String,
required: true
}
});
module.exports = mongoose.model('User', UserSchema);