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