2021-09-26 18:06:31 +02:00
|
|
|
import mongoose from 'mongoose'
|
2021-09-25 17:47:05 +02:00
|
|
|
|
2021-09-26 18:06:31 +02:00
|
|
|
const Player = new mongoose.Schema({
|
2021-09-25 17:47:05 +02:00
|
|
|
name: String,
|
|
|
|
points: Number,
|
|
|
|
rankPoints: Number,
|
2021-09-29 20:29:06 +02:00
|
|
|
teamPoints: Number,
|
2021-10-09 23:22:56 +02:00
|
|
|
pointsThisWeek: Number,
|
|
|
|
pointsThisMonth: Number,
|
2021-09-29 20:29:06 +02:00
|
|
|
firstFinish: Date
|
2021-09-25 17:47:05 +02:00
|
|
|
})
|
|
|
|
|
2021-10-30 19:19:58 +02:00
|
|
|
Player.index({ name: 1 })
|
|
|
|
|
2021-10-06 20:36:20 +02:00
|
|
|
/**
|
|
|
|
* This cotains the mongoose 'Player' model.
|
|
|
|
* @module schemas/Player
|
|
|
|
*/
|
2021-09-26 18:06:31 +02:00
|
|
|
export default mongoose.model("Player", Player)
|