-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Seasonal stats #734
base: feature/season
Are you sure you want to change the base?
WIP Seasonal stats #734
Conversation
enum: [ | ||
'unranked', | ||
'iron', | ||
'bronze', | ||
'silver', | ||
'gold', | ||
'platinum', | ||
'diamond', | ||
'champion', | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add the actual values of each of these brackets on the season model.
'diamond', | ||
'champion', | ||
], | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you also decide to put the mappings in the db instead of the code constants, let's also make sure the server only pulls that mapping once on startup rather than on every game finish.
}); | ||
|
||
// compile schema into a model | ||
const SeasonalStats = mongoose.model('seasonalStats', seasonalStatsSchema); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const SeasonalStats = mongoose.model('seasonalStats', seasonalStatsSchema); | |
const UserSeasonStats = mongoose.model('seasonalStats', seasonalStatsSchema); |
}, | ||
}); | ||
|
||
// compile schema into a model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider if you want to add in any season-level aggregated statistics, e.g. total number of games played in a season.
rankedGamesWon: number; | ||
rankedGamesLost: number; | ||
winRate: number; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add roles as well?
No description provided.