Invallers
All checks were successful
Gitea/swiss-backend/pipeline/head This commit looks good

This commit is contained in:
2025-09-11 23:43:10 +02:00
parent d7dee35d6e
commit da7ea66d3e
10 changed files with 111 additions and 9 deletions

View File

@@ -33,6 +33,9 @@ public class TournamentPlayer extends AbstractEntity {
private Long counts = 0L;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
private List<TournamentPlayerSubstitution> substitutions;
public void incrementCounts() {
this.counts++;
}

View File

@@ -0,0 +1,28 @@
package nl.connectedit.swiss.domain.entity;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Entity
@Table
@Getter
@Setter
public class TournamentPlayerSubstitution extends AbstractEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
private TournamentPlayer tournamentPlayer;
@ManyToOne
private Event event;
@ManyToOne
private TournamentPlayer substitute;
}