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
+18
View File
@@ -0,0 +1,18 @@
const mongoose = require('mongoose')
const ScoreSchema = mongoose.Schema({
deviceId: {
type: String,
ref: 'Device'
},
score: {
type: Number,
min: 0
},
userId: {
type: String,
ref: 'User'
},
})
module.exports = mongoose.model('Score', ScoreSchema)