File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/main/java/com/gabriel_torelo/game_list/dto Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 11package com .gabriel_torelo .game_list .dto ;
22
33import com .gabriel_torelo .game_list .entities .Game ;
4+ import com .gabriel_torelo .game_list .projections .GameMinProjection ;
45
56public class GameMinDTO {
67 private Long id ;
78 private String title ;
89 private Double score ;
910 private String imgUrl ;
11+ private Integer position ;
1012
1113 public GameMinDTO () {
1214 }
@@ -18,6 +20,14 @@ public GameMinDTO(Game entity) {
1820 imgUrl = entity .getImgUrl ();
1921 }
2022
23+ public GameMinDTO (GameMinProjection projection ) {
24+ id = projection .getId ();
25+ title = projection .getTitle ();
26+ score = projection .getScore ();
27+ imgUrl = projection .getImgUrl ();
28+ position = projection .getPosition ();
29+ }
30+
2131 public Long getId () {
2232 return id ;
2333 }
@@ -49,4 +59,12 @@ public void setScore(Double score) {
4959 public void setImgUrl (String imgUrl ) {
5060 this .imgUrl = imgUrl ;
5161 }
62+
63+ public Integer getPosition () {
64+ return position ;
65+ }
66+
67+ public void setPosition (Integer position ) {
68+ this .position = position ;
69+ }
5270}
You can’t perform that action at this time.
0 commit comments