Skip to content

Commit 7bba446

Browse files
committed
cria DTO com as mínimas informações dos jogos + descrição curta (Short - Game Description)
1 parent 934777d commit 7bba446

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package com.gabriel_torelo.game_list.dto;
2+
3+
import com.gabriel_torelo.game_list.entities.Game;
4+
5+
public class GameShortDTO {
6+
private GameMinDTO gameMinDTO = new GameMinDTO();
7+
private String shortDescription;
8+
9+
public GameShortDTO() {
10+
}
11+
12+
public GameShortDTO(Game entity) {
13+
gameMinDTO.setId(entity.getId());
14+
gameMinDTO.setTitle(entity.getTitle());
15+
gameMinDTO.setScore(entity.getScore());
16+
gameMinDTO.setImgUrl(entity.getImgUrl());
17+
shortDescription = entity.getShortDescription();
18+
}
19+
20+
public Long getId() {
21+
return gameMinDTO.getId();
22+
}
23+
24+
public String getTitle() {
25+
return gameMinDTO.getTitle();
26+
}
27+
28+
public Double getScore() {
29+
return gameMinDTO.getScore();
30+
}
31+
32+
public String getImgUrl() {
33+
return gameMinDTO.getImgUrl();
34+
}
35+
36+
public String getShortDescription() {
37+
return shortDescription;
38+
}
39+
}

0 commit comments

Comments
 (0)