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

Include more data on existing tournament item DTOs #580

Open
2 of 7 tasks
myssto opened this issue Jan 10, 2025 · 3 comments
Open
2 of 7 tasks

Include more data on existing tournament item DTOs #580

myssto opened this issue Jan 10, 2025 · 3 comments
Assignees
Labels
project:API Items related to the API project type:feature

Comments

@myssto
Copy link
Contributor

myssto commented Jan 10, 2025

Tournament items returned from the API should include all of the stats that we generate. Some of the following DTOs are already implemented but as part of this process they should be double checked to ensure code quality and proper documentation.

TournamentDTO

  • PlayerTournamentStatsDTO[] PlayerStats
  • PlayerCompactDTO[] Players (loaded in the same manner as on the MatchDTO)

MatchDTO

  • RatingAdjustmentDTO[] RatingAdjustments
  • PlayerMatchStatsDTO[] PlayerStats
  • MatchWinRecordDTO? WinRecord

GameDTO

  • GameWinRecordDTO? WinRecord

GameScoreDTO

  • Include int? Placement on the existing GameScoreDTO
@github-project-automation github-project-automation bot moved this to Backlog in otr-beta-v2 Jan 10, 2025
@myssto myssto moved this from Backlog to Ready in otr-beta-v2 Jan 10, 2025
@myssto myssto added type:feature project:API Items related to the API project labels Jan 10, 2025
@hburn7 hburn7 self-assigned this Jan 10, 2025
@hburn7
Copy link
Collaborator

hburn7 commented Jan 11, 2025

PlayerTournamentStatsDTO is currently designed to be attached to a player's statistics object. Therefore it is designed to be from the perspective of the player. I think having a new DTO, such as TournamentPlayerStatsDTO would be appropriate. Then we can design it to be from the perspective of the tournament which will work better imo.

RatingAdjustmentDTO currently does not feature a PlayerId field. I think doing an adhoc Dictionary, such as Dictionary<int, RatingAdjustmentDTO> would be fine here.

yay/nay/wanna fight?

@myssto
Copy link
Contributor Author

myssto commented Jan 12, 2025

yay/nay/wanna fight?

I choose violence

PlayerTournamentStatsDTO is currently designed to be attached to a player's statistics object. Therefore it is designed to be from the perspective of the player. I think having a new DTO, such as TournamentPlayerStatsDTO would be appropriate. Then we can design it to be from the perspective of the tournament which will work better imo.

The PlayerTournamentStats entity is 1000% not only designed to be viewed from the perspective of the player. It is simply an aggregate of a player performance over an entire tournament. Currently we use PlayerTournamentMatchCostDTO (which probably just needs to be removed in favor of a new PlayerTournamentStatsDTO based on the entity directly) to give a player performance summary for the dashboard but it can be used anywhere. I am imagining an individual tournament page can have a list of participating players, displayed in order of average match cost, average score, etc.

RatingAdjustmentDTO currently does not feature a PlayerId field. I think doing an adhoc Dictionary, such as Dictionary<int, RatingAdjustmentDTO> would be fine here.

Don't think that would be consistent with the rest of our DTOs at all. I would just add a PlayerId field to the DTO and then it can be easily tied back to the list of PlayerCompactDTO included on the match

@myssto
Copy link
Contributor Author

myssto commented Jan 12, 2025

lol you were right we do have a PlayerTournamentStatsDTO already, I just didn't see it because the file name is not the same as the class.

I think having a new DTO, such as TournamentPlayerStatsDTO would be appropriate

Having both TournamentPlayerStatsDTO and PlayerTournamentStatsDTO sounds like it would be incredibly confusing. What if we just found a better name for the existing PlayerTournamentStatsDTO ?

@myssto myssto self-assigned this Jan 13, 2025
@myssto myssto moved this from Ready to In progress in otr-beta-v2 Jan 13, 2025
This was referenced Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project:API Items related to the API project type:feature
Projects
Status: In progress
Development

No branches or pull requests

2 participants