Skip to content
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

Open
wants to merge 9 commits into
base: feature/season
Choose a base branch
from
Open

WIP Seasonal stats #734

wants to merge 9 commits into from

Conversation

kev306
Copy link
Collaborator

@kev306 kev306 commented Jan 19, 2025

No description provided.

@kev306 kev306 changed the base branch from master to feature/season January 19, 2025 12:33
Comment on lines +29 to +38
enum: [
'unranked',
'iron',
'bronze',
'silver',
'gold',
'platinum',
'diamond',
'champion',
],
Copy link
Owner

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',
],
},
Copy link
Owner

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);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const SeasonalStats = mongoose.model('seasonalStats', seasonalStatsSchema);
const UserSeasonStats = mongoose.model('seasonalStats', seasonalStatsSchema);

},
});

// compile schema into a model
Copy link
Owner

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;

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add roles as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants