ddstats-server/schemas/Player.js
2021-10-30 19:19:58 +02:00

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)