wip: send competition data

This commit is contained in:
2024-08-14 21:33:11 +02:00
parent 4be7b28efd
commit 7f80c876d3
12 changed files with 291 additions and 43 deletions

View File

@@ -19,13 +19,18 @@ public class MatchData {
private String c2_str;
private Long poule;
private long poule_ord;
private boolean isEnd = true;
private char groupe;
private List<ScoreEmbeddable> scores;
public static MatchData fromModel(MatchModel model) {
if (model == null)
return null;
return new MatchData(model.getSystemId(), model.getC1_id().getId(), model.getC1_str(), model.getC2_id().getId(),
model.getC2_str(), model.getPoule(), model.getPoule_ord(), model.getScores());
return new MatchData(model.getSystemId(),
(model.getC1_id() == null) ? null : model.getC1_id().getId(), model.getC1_str(),
(model.getC2_id() == null) ? null : model.getC2_id().getId(), model.getC2_str(),
model.getPoule().getId(), model.getPoule_ord(), model.isEnd(), model.getGroupe(),
model.getScores());
}
}