add pagination and fix bug
This commit is contained in:
@@ -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'
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user