Added game.id and team.id
All checks were successful
Gitea/swiss-backend/pipeline/head This commit looks good
All checks were successful
Gitea/swiss-backend/pipeline/head This commit looks good
This commit is contained in:
@@ -7,6 +7,8 @@ import lombok.Setter;
|
||||
@Setter
|
||||
public class GameDto extends AbstractDto {
|
||||
|
||||
private Long id;
|
||||
|
||||
private Long score1;
|
||||
|
||||
private Long score2;
|
||||
|
||||
@@ -7,6 +7,8 @@ import lombok.Setter;
|
||||
@Setter
|
||||
public class TeamDto extends AbstractDto {
|
||||
|
||||
private Long id;
|
||||
|
||||
private PlayerDto player1;
|
||||
|
||||
private PlayerDto player2;
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user