Added game.id and team.id
All checks were successful
Gitea/swiss-backend/pipeline/head This commit looks good

This commit is contained in:
2025-08-12 23:32:11 +02:00
parent 0b6d15b313
commit 3365c19f78
4 changed files with 6 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ import lombok.Setter;
@Setter
public class GameDto extends AbstractDto {
private Long id;
private Long score1;
private Long score2;

View File

@@ -7,6 +7,8 @@ import lombok.Setter;
@Setter
public class TeamDto extends AbstractDto {
private Long id;
private PlayerDto player1;
private PlayerDto player2;

View File

@@ -10,6 +10,7 @@ public class GameMapper implements DtoMapper<Game, GameDto> {
@Override
public GameDto toDto(Game game) {
var gameDto = new GameDto();
gameDto.setId(game.getId());
gameDto.setScore1(game.getScore1());
gameDto.setScore2(game.getScore2());

View File

@@ -14,6 +14,7 @@ public class TeamMapper implements DtoMapper<Team, TeamDto> {
@Override
public TeamDto toDto(Team team) {
var teamDto = new TeamDto();
teamDto.setId(team.getId());
teamDto.setPlayer1(playerMapper.toDto(team.getPlayer1()));
if (team.getPlayer2() != null) {