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

feat(be): implement contest participant standings #1233

Merged
merged 17 commits into from
Jan 25, 2024

Conversation

gyunseo
Copy link
Contributor

@gyunseo gyunseo commented Jan 22, 2024

Description

  • /contest/{contest_id} Path로 groupId query와 함께 GET 요청을 보냈을 때, contest detail뿐만 아니라 contest participant의 standing을 함께 반환합니다.

Additional context

그래서 일단은 ContestRecord table에 User가 풀어서 얻은 점수인 score라는 field를 추가했습니다.
우선은 score가 높은 순으로 정렬하고, 만약 score가 같을 시에는 totalPenalty(패널티)가 적은 사람이 패널티가 높은 사람보다 순위가 좋도록 (standing의 절대치가 작다라는 말) 했습니다.


closes #1203

Before submitting the PR, please make sure you do the following

@gyunseo gyunseo linked an issue Jan 22, 2024 that may be closed by this pull request
3 tasks
Copy link

vercel bot commented Jan 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
codedang ✅ Ready (Inspect) Visit Preview Jan 24, 2024 3:25pm

@gyunseo gyunseo requested a review from Jaehyeon1020 January 22, 2024 05:34
Copy link
Member

@Jaehyeon1020 Jaehyeon1020 left a comment

Choose a reason for hiding this comment

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

rankings를 표시할 때 지금은 많은 문제를 해결한 유저 순서대로 유저 정보만 나열이 되는데, 실제 몇 등인지 랭크를 같이 표시해주는 방법도 생각해보면 좋을 것 같습니다!

@gyunseo gyunseo changed the title feat(be): implement contest participant rank feat(be): implement contest participant standings Jan 24, 2024
@gyunseo gyunseo merged commit 77c3334 into main Jan 25, 2024
10 checks passed
@gyunseo gyunseo deleted the 1203-contest-participant-rank branch January 25, 2024 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contest 참여자 순위, 문제별 획득 점수 조회 기능 추가
2 participants