front-end almost done | started back-end
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
const mongoose = require('mongoose')
|
||||
|
||||
const AddressSchema = mongoose.Schema({
|
||||
country: String,
|
||||
province: String,
|
||||
city: String,
|
||||
address: String,
|
||||
postal_code: String,
|
||||
plaque: String,
|
||||
block_number: String,
|
||||
receiver_first_name: String,
|
||||
receiver_last_name: String,
|
||||
receiver_mobile: String,
|
||||
created_at: String
|
||||
})
|
||||
|
||||
|
||||
const UserSchema = mongoose.Schema({
|
||||
first_name: String,
|
||||
last_name: String,
|
||||
type: {type: String, enum: ['personal', 'company'], default: 'personal'},
|
||||
company_name: String,
|
||||
email_personal: String,
|
||||
email_company: String,
|
||||
fb_id_personal: String,
|
||||
fb_id_company: String,
|
||||
ig_id_personal: String,
|
||||
ig_id_company: String,
|
||||
skype_id_personal: String,
|
||||
skype_id_company: String,
|
||||
addresses: [AddressSchema],
|
||||
phone_number: String,
|
||||
password: String,
|
||||
confirmed: {type: Boolean, default: false},
|
||||
confirmation_key: String,
|
||||
scope: String,
|
||||
token: String,
|
||||
reset_pass_key: String,
|
||||
created_at: String,
|
||||
updated_at: String
|
||||
})
|
||||
|
||||
module.exports = mongoose.model('User', UserSchema)
|
||||
Reference in New Issue
Block a user