add pagination and fix bug

This commit is contained in:
Mr Swift
2024-08-07 15:42:53 +03:30
parent 13f991eab2
commit db6c8d6681
13 changed files with 322 additions and 156 deletions
+12 -12
View File
@@ -1,24 +1,24 @@
const mongoose = require('mongoose')
const InstalledDeviceSchema = mongoose.Schema({
deviceId:{
type:String,
ref:"Device"
deviceId: {
type: String,
ref: "Device"
},
status:{
type:Number,
enum:[
status: {
type: Number,
enum: [
0, // Pending
1, // Accepted
2, // Rejected
],
default:0
default: 0
},
registerDate:Date,
installationDate:Date,
userId:{
type:String,
ref:'User'
registerDate: Date,
installationDate: Date,
userId: {
type: String,
ref: 'User'
},
})