19 lines
392 B
JavaScript
19 lines
392 B
JavaScript
import mongoose from 'mongoose'
|
|
|
|
const Player = new mongoose.Schema({
|
|
name: String,
|
|
points: Number,
|
|
rankPoints: Number,
|
|
teamPoints: Number,
|
|
pointsThisWeek: Number,
|
|
pointsThisMonth: Number,
|
|
firstFinish: Date
|
|
})
|
|
|
|
Player.index({ name: 1 })
|
|
|
|
/**
|
|
* This cotains the mongoose 'Player' model.
|
|
* @module schemas/Player
|
|
*/
|
|
export default mongoose.model("Player", Player) |