feat: support decimal on weight

This commit is contained in:
2026-02-13 21:42:48 +01:00
parent 2fd09af0ea
commit d857fce71f
9 changed files with 19 additions and 19 deletions

View File

@@ -37,8 +37,8 @@ public class RegisterModel {
@JoinColumn(name = "id_membre")
MembreModel membre;
Integer weight;
Integer weightReal;
Float weight;
Float weightReal;
int overCategory = 0;
Categorie categorie;
@@ -61,7 +61,7 @@ public class RegisterModel {
)
List<CatPresetModel> categoriesInscrites = new ArrayList<>();
public RegisterModel(CompetitionModel competition, MembreModel membre, Integer weight, int overCategory,
public RegisterModel(CompetitionModel competition, MembreModel membre, Float weight, int overCategory,
Categorie categorie, ClubModel club) {
this.id = new RegisterId(competition.getId(), membre.getId());
this.competition = competition;
@@ -91,7 +91,7 @@ public class RegisterModel {
return Categorie.values()[Math.min(tmp.ordinal() + this.overCategory, Categorie.values().length - 1)];
}
public Integer getWeight2() {
public Float getWeight2() {
if (weightReal != null)
return weightReal;
return weight;