Initial push, base application done
This commit is contained in:
19
user.model.js
Normal file
19
user.model.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const mongoose = require('mongoose');
|
||||
const Schema = mongoose.Schema;
|
||||
|
||||
// Database schema for a user
|
||||
let User = new Schema({
|
||||
email: {
|
||||
type: String
|
||||
},
|
||||
name: {
|
||||
type: String
|
||||
},
|
||||
password: {
|
||||
type: String
|
||||
}
|
||||
}, {
|
||||
collection: 'users'
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('User', User);
|
||||
Reference in New Issue
Block a user