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)
|
||||
Reference in New Issue
Block a user