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
+32
View File
@@ -0,0 +1,32 @@
const mongoose = require('mongoose')
const InstalledDeviceSchema = mongoose.Schema({
deviceId:{
type:String,
ref:"Device"
},
status:{
type:Number,
enum:[
0, // Pending
1, // Accepted
2, // Rejected
]
},
dollarProfit:{
type:Number,
min:0
},
score:{
type:Number,
min:0
},
registerDate:Date,
installationDate:Date,
userId:{
type:String,
ref:'User'
},
})
module.exports = mongoose.model('InstalledDevice', InstalledDeviceSchema)