user & device model

This commit is contained in:
Mr Swift
2024-08-05 14:33:18 +03:30
parent 7578de5775
commit 01e0dc8a5a
2 changed files with 27 additions and 0 deletions
+19
View File
@@ -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)