feat: competition result

This commit is contained in:
2025-09-03 18:56:58 +02:00
parent 587173c79f
commit d1c7f37a94
14 changed files with 1294 additions and 1 deletions

View File

@@ -53,4 +53,31 @@ public class MatchModel {
List<ScoreEmbeddable> scores = new ArrayList<>();
char poule = 'A';
public String getC1Name() {
if (c1_id == null)
return c1_str;
return c1_id.fname + " " + c1_id.lname;
}
public String getC2Name() {
if (c2_id == null)
return c2_str;
return c2_id.fname + " " + c2_id.lname;
}
public int win() {
int sum = 0;
for (ScoreEmbeddable score : this.getScores()) {
if (score.getS1() == -1000 || score.getS2() == -1000)
continue;
if (score.getS1() > score.getS2())
sum++;
else if (score.getS1() < score.getS2())
sum--;
}
return sum;
}
}

View File

@@ -53,4 +53,14 @@ public class RegisterModel {
this.categorie = categorie;
this.club = club;
}
public String getName() {
return membre.fname + " " + membre.lname;
}
public ClubModel getClub2() {
if (club == null)
return membre.club;
return club;
}
}