feat: move competition setting to ffsaf site
This commit is contained in:
31
src/main/java/fr/titionfire/ffsaf/rest/data/MatchData.java
Normal file
31
src/main/java/fr/titionfire/ffsaf/rest/data/MatchData.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package fr.titionfire.ffsaf.rest.data;
|
||||
|
||||
import fr.titionfire.ffsaf.data.model.MatchModel;
|
||||
import fr.titionfire.ffsaf.utils.ScoreEmbeddable;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@RegisterForReflection
|
||||
public class MatchData {
|
||||
private Long id;
|
||||
private Long c1_id;
|
||||
private String c1_str;
|
||||
private Long c2_id;
|
||||
private String c2_str;
|
||||
private Long poule;
|
||||
private long poule_ord;
|
||||
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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user