INIT models

This commit is contained in:
Mr Swift
2024-08-05 15:25:30 +03:30
parent 5e46989357
commit f708d708d1
5 changed files with 40 additions and 2 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, // not installed
1 // installed
],
default:0
}
})
module.exports = mongoose.model('Device', deviceSchema)