front-end almost done | started back-end

This commit is contained in:
Amir Mohamadi
2020-11-23 19:39:26 +03:30
parent 95149f0e72
commit 80a7abafb7
191 changed files with 60163 additions and 950 deletions
+43
View File
@@ -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)