-
Notifications
You must be signed in to change notification settings - Fork 1
Generate game report after the game ends. #176
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
base: main
Are you sure you want to change the base?
Changes from all commits
f296930
a2164a3
bbc04bd
5282463
e25a919
8c0ab51
ddc34c1
54d81fe
7f5d22a
5530121
913cf38
15aa1ed
cc3a0d4
56a73ec
0fbd919
ed5c3da
18e1f1c
0311bec
22eff98
56c580a
0ae5741
ee95904
54795e5
3433138
9dcabee
4325c79
71f715c
f43d8ce
b22927e
832341a
ed98efb
6cf7dd8
bd62778
c972883
da88286
dabe142
8ad55e7
7f52b25
056dd07
f3dc868
fe0bd95
72dd0a6
87d39b1
c743cfa
2705ac5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package com.codejoust.main.dao; | ||
|
|
||
| import com.codejoust.main.model.report.GameReport; | ||
|
|
||
| import org.springframework.data.repository.CrudRepository; | ||
|
|
||
| public interface GameReportRepository extends CrudRepository<GameReport, Integer> { | ||
|
|
||
| GameReport findGameReportByGameReportId(String gameReportId); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package com.codejoust.main.dao; | ||
|
|
||
| import org.springframework.data.repository.CrudRepository; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import com.codejoust.main.model.problem.Problem; | ||
| import com.codejoust.main.model.problem.ProblemContainer; | ||
|
|
||
| // This will be AUTO IMPLEMENTED by Spring into a Bean called | ||
| // problemContainerRepository; CRUD refers Create, Read, Update, Delete | ||
| public interface ProblemContainerRepository extends CrudRepository<ProblemContainer, Integer> { | ||
| List<ProblemContainer> findAllByProblem(Problem problem); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| import java.util.ArrayList; | ||
| import java.util.List; | ||
|
|
||
| import javax.persistence.CascadeType; | ||
| import javax.persistence.Entity; | ||
| import javax.persistence.FetchType; | ||
| import javax.persistence.GeneratedValue; | ||
|
|
@@ -58,9 +59,13 @@ public class User { | |
| private Room room; | ||
|
|
||
| // Thie list holds the submission group associated with the current room | ||
| @OneToMany(fetch = FetchType.EAGER) | ||
| @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL) | ||
| @Setter(AccessLevel.PRIVATE) | ||
| @Fetch(value = FetchMode.SUBSELECT) | ||
| @JoinColumn(name = "submission_group_reports_table_id") | ||
| private List<SubmissionGroupReport> submissionGroupReports = new ArrayList<>(); | ||
|
|
||
| public void addSubmissionGroupReport(SubmissionGroupReport submissionGroupReport) { | ||
| submissionGroupReports.add(submissionGroupReport); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to double-check, this isn't included in the UserDto right? Since it's only used for the report related stuff?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's right - this is not included in the standard |
||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.