user & device model
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
const mongoose = require('mongoose')
|
||||||
|
|
||||||
|
const deviceSchema = mongoose.Schema({
|
||||||
|
model:String,
|
||||||
|
IMEI:{
|
||||||
|
type:String,
|
||||||
|
unique:true
|
||||||
|
},
|
||||||
|
status:{
|
||||||
|
type:Number,
|
||||||
|
enum:[
|
||||||
|
0, // new
|
||||||
|
1 // installed
|
||||||
|
],
|
||||||
|
default:0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
module.exports = mongoose.model('Device', deviceSchema)
|
||||||
@@ -7,6 +7,7 @@ const UserSchema = mongoose.Schema({
|
|||||||
username: String,
|
username: String,
|
||||||
permissions: Array,
|
permissions: Array,
|
||||||
personalCode:String,
|
personalCode:String,
|
||||||
|
|
||||||
// for user
|
// for user
|
||||||
national_code: String,
|
national_code: String,
|
||||||
province_id: String,
|
province_id: String,
|
||||||
@@ -42,6 +43,13 @@ const UserSchema = mongoose.Schema({
|
|||||||
last_name: String,
|
last_name: String,
|
||||||
password: String,
|
password: String,
|
||||||
|
|
||||||
|
// for GPS
|
||||||
|
shopName:String,
|
||||||
|
shopNumber:String,
|
||||||
|
shopAddress:String,
|
||||||
|
birthDate:String,
|
||||||
|
|
||||||
|
|
||||||
/// //////////////////////////////// user confirmations
|
/// //////////////////////////////// user confirmations
|
||||||
confirmed: { type: Boolean, default: false },
|
confirmed: { type: Boolean, default: false },
|
||||||
email_confirmed: { type: Boolean, default: false },
|
email_confirmed: { type: Boolean, default: false },
|
||||||
|
|||||||
Reference in New Issue
Block a user