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; + } +} 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; + } } 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; + } +}