feat: comp register optional weight config
This commit is contained in:
@@ -44,6 +44,7 @@ public class CompetitionGuestModel implements CombModel {
|
||||
String country = "fr";
|
||||
|
||||
Integer weight = null;
|
||||
Integer weightReal = null;
|
||||
|
||||
@ManyToMany(fetch = FetchType.EAGER, cascade = CascadeType.PERSIST)
|
||||
@JoinTable(
|
||||
@@ -107,4 +108,8 @@ public class CompetitionGuestModel implements CombModel {
|
||||
}
|
||||
return Stream.concat(comb.stream(), guest.stream()).anyMatch(c -> Objects.equals(c, comb_));
|
||||
}
|
||||
|
||||
public Integer getWeight2() {
|
||||
return (this.weightReal != null) ? this.weightReal : this.weight;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user