From d7693e45338fc23c517267a8883a871ce79d865b Mon Sep 17 00:00:00 2001 From: Gabriel Torelo <57268681+GabrielTorelo@users.noreply.github.com> Date: Sat, 15 Jul 2023 01:25:09 -0300 Subject: [PATCH 1/3] =?UTF-8?q?cria=20os=20m=C3=A9todos=20'set'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gabriel_torelo/game_list/dto/GameMinDTO.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/gabriel_torelo/game_list/dto/GameMinDTO.java b/src/main/java/com/gabriel_torelo/game_list/dto/GameMinDTO.java index 7cbbcd0..79cac6c 100644 --- a/src/main/java/com/gabriel_torelo/game_list/dto/GameMinDTO.java +++ b/src/main/java/com/gabriel_torelo/game_list/dto/GameMinDTO.java @@ -33,4 +33,20 @@ public Double getScore() { public String getImgUrl() { return imgUrl; } + + public void setId(Long id) { + this.id = id; + } + + public void setTitle(String title) { + this.title = title; + } + + public void setScore(Double score) { + this.score = score; + } + + public void setImgUrl(String imgUrl) { + this.imgUrl = imgUrl; + } } From 934777d2e295e29a9cd43003ba3fdc79c62811eb Mon Sep 17 00:00:00 2001 From: Gabriel Torelo <57268681+GabrielTorelo@users.noreply.github.com> Date: Sat, 15 Jul 2023 01:30:07 -0300 Subject: [PATCH 2/3] =?UTF-8?q?cria=20DTO=20com=20quase=20todas=20as=20inf?= =?UTF-8?q?orma=C3=A7=C3=B5es=20dos=20jogos=20(Long=20-=20Game=20Descripti?= =?UTF-8?q?on)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../game_list/dto/GameLongDTO.java | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 src/main/java/com/gabriel_torelo/game_list/dto/GameLongDTO.java diff --git a/src/main/java/com/gabriel_torelo/game_list/dto/GameLongDTO.java b/src/main/java/com/gabriel_torelo/game_list/dto/GameLongDTO.java new file mode 100644 index 0000000..bc8c94d --- /dev/null +++ b/src/main/java/com/gabriel_torelo/game_list/dto/GameLongDTO.java @@ -0,0 +1,86 @@ +package com.gabriel_torelo.game_list.dto; + +import org.springframework.beans.BeanUtils; +import com.gabriel_torelo.game_list.entities.Game; + +public class GameLongDTO { + private Long id; + private String title; + private Integer year; + private String gender; + private String platforms; + private Double score; + private String imgUrl; + private String longDescription; + + public GameLongDTO() { + } + + public GameLongDTO(Game entity) { + BeanUtils.copyProperties(entity, this); + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public Integer getYear() { + return year; + } + + public void setYear(Integer year) { + this.year = year; + } + + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public String getPlatforms() { + return platforms; + } + + public void setPlatforms(String platforms) { + this.platforms = platforms; + } + + public Double getScore() { + return score; + } + + public void setScore(Double score) { + this.score = score; + } + + public String getImgUrl() { + return imgUrl; + } + + public void setImgUrl(String imgUrl) { + this.imgUrl = imgUrl; + } + + public String getLongDescription() { + return longDescription; + } + + public void setLongDescription(String longDescription) { + this.longDescription = longDescription; + } +} From 7bba4460abb086de81b1f6bb031fb4bcf2d7f917 Mon Sep 17 00:00:00 2001 From: Gabriel Torelo <57268681+GabrielTorelo@users.noreply.github.com> Date: Sat, 15 Jul 2023 01:32:55 -0300 Subject: [PATCH 3/3] =?UTF-8?q?cria=20DTO=20com=20as=20m=C3=ADnimas=20info?= =?UTF-8?q?rma=C3=A7=C3=B5es=20dos=20jogos=20+=20descri=C3=A7=C3=A3o=20cur?= =?UTF-8?q?ta=20(Short=20-=20Game=20Description)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../game_list/dto/GameShortDTO.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/main/java/com/gabriel_torelo/game_list/dto/GameShortDTO.java diff --git a/src/main/java/com/gabriel_torelo/game_list/dto/GameShortDTO.java b/src/main/java/com/gabriel_torelo/game_list/dto/GameShortDTO.java new file mode 100644 index 0000000..bb70501 --- /dev/null +++ b/src/main/java/com/gabriel_torelo/game_list/dto/GameShortDTO.java @@ -0,0 +1,39 @@ +package com.gabriel_torelo.game_list.dto; + +import com.gabriel_torelo.game_list.entities.Game; + +public class GameShortDTO { + private GameMinDTO gameMinDTO = new GameMinDTO(); + private String shortDescription; + + public GameShortDTO() { + } + + public GameShortDTO(Game entity) { + gameMinDTO.setId(entity.getId()); + gameMinDTO.setTitle(entity.getTitle()); + gameMinDTO.setScore(entity.getScore()); + gameMinDTO.setImgUrl(entity.getImgUrl()); + shortDescription = entity.getShortDescription(); + } + + public Long getId() { + return gameMinDTO.getId(); + } + + public String getTitle() { + return gameMinDTO.getTitle(); + } + + public Double getScore() { + return gameMinDTO.getScore(); + } + + public String getImgUrl() { + return gameMinDTO.getImgUrl(); + } + + public String getShortDescription() { + return shortDescription; + } +}