feat: rework competition perm, naming, competition data
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 10m6s

This commit is contained in:
2025-08-17 22:07:12 +02:00
parent 9e9391465d
commit dedae02676
35 changed files with 791 additions and 266 deletions

View File

@@ -17,14 +17,17 @@ import lombok.Setter;
@Entity
@Table(name = "register")
@IdClass(RegisterId.class)
public class RegisterModel {
@Id
@EmbeddedId
RegisterId id;
@MapsId("competitionId")
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_competition")
CompetitionModel competition;
@Id
@MapsId("membreId")
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "id_membre")
MembreModel membre;
@@ -37,4 +40,14 @@ public class RegisterModel {
@JoinColumn(name = "club")
ClubModel club = null;
public RegisterModel(CompetitionModel competition, MembreModel membre, Integer weight, int overCategory,
Categorie categorie, ClubModel club) {
this.id = new RegisterId(competition.getId(), membre.getId());
this.competition = competition;
this.membre = membre;
this.weight = weight;
this.overCategory = overCategory;
this.categorie = categorie;
this.club = club;
}
}