feat: rework competition perm, naming, competition data
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 10m6s
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 10m6s
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user