Add database connection...
This commit is contained in:
12
src/models/users.js
Normal file
12
src/models/users.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const mongoose = require('mongoose');
|
||||
const Schema = mongoose.Schema;
|
||||
const UserSchema = new Schema({
|
||||
firstname: { type: String },
|
||||
familyname: { type: String },
|
||||
email: { type: String },
|
||||
phonenumber: { type: String },
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
});
|
||||
module.exports = mongoose.model('user', UserSchema, 'users');
|
||||
Reference in New Issue
Block a user