From 042631e94b916cb806e24ade4c5db98c45d5151b Mon Sep 17 00:00:00 2001 From: eeddiinn Date: Wed, 27 Mar 2024 20:40:24 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=90=9B=20[FIX]=20popularRate=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?#80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/sopt/lequuServer/domain/book/model/Book.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/sopt/lequuServer/domain/book/model/Book.java b/src/main/java/org/sopt/lequuServer/domain/book/model/Book.java index 42942e6..12aaee2 100644 --- a/src/main/java/org/sopt/lequuServer/domain/book/model/Book.java +++ b/src/main/java/org/sopt/lequuServer/domain/book/model/Book.java @@ -64,8 +64,11 @@ public void addFavorite(Favorite favorite) { favorites.add(favorite); } + @Column(nullable = false) + private int popularRate; + @Builder - public Book(String uuid, String favoriteName, String favoriteImage, String title, String description, String backgroundColor, Member member) { + public Book(String uuid, String favoriteName, String favoriteImage, String title, String description, String backgroundColor, Member member, int popularRate) { this.uuid = uuid; this.favoriteName = favoriteName; this.favoriteImage = favoriteImage; @@ -73,9 +76,10 @@ public Book(String uuid, String favoriteName, String favoriteImage, String title this.description = description; this.backgroundColor = backgroundColor; this.member = member; + this.popularRate = popularRate; } - public static Book of(String uuid, String favoriteName, String favoriteImage, String title, String description, String backgroundColor, Member member) { - return new Book(uuid, favoriteName, favoriteImage, title, description, backgroundColor, member); + public static Book of(String uuid, String favoriteName, String favoriteImage, String title, String description, String backgroundColor, Member member, int popularRate) { + return new Book(uuid, favoriteName, favoriteImage, title, description, backgroundColor, member, popularRate); } } From a3a79b016526ebc0a6a301c452c61ed0f36733d3 Mon Sep 17 00:00:00 2001 From: eeddiinn Date: Wed, 27 Mar 2024 20:44:31 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=90=9B=20[FIX]=20popularRate=200=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20#80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/org/sopt/lequuServer/domain/book/model/Book.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/sopt/lequuServer/domain/book/model/Book.java b/src/main/java/org/sopt/lequuServer/domain/book/model/Book.java index 12aaee2..a344c19 100644 --- a/src/main/java/org/sopt/lequuServer/domain/book/model/Book.java +++ b/src/main/java/org/sopt/lequuServer/domain/book/model/Book.java @@ -65,7 +65,7 @@ public void addFavorite(Favorite favorite) { } @Column(nullable = false) - private int popularRate; + private int popularRate = 0; @Builder public Book(String uuid, String favoriteName, String favoriteImage, String title, String description, String backgroundColor, Member member, int popularRate) { From dcc29f227f7897741f043b449a71689dc1cc8130 Mon Sep 17 00:00:00 2001 From: eeddiinn Date: Thu, 28 Mar 2024 19:19:34 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20[REFACTOR]=20PR=20?= =?UTF-8?q?=EB=A6=AC=EB=B7=B0=20=EB=B0=98=EC=98=81=20#80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/sopt/lequuServer/domain/book/model/Book.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/sopt/lequuServer/domain/book/model/Book.java b/src/main/java/org/sopt/lequuServer/domain/book/model/Book.java index a344c19..0055837 100644 --- a/src/main/java/org/sopt/lequuServer/domain/book/model/Book.java +++ b/src/main/java/org/sopt/lequuServer/domain/book/model/Book.java @@ -64,11 +64,10 @@ public void addFavorite(Favorite favorite) { favorites.add(favorite); } - @Column(nullable = false) private int popularRate = 0; @Builder - public Book(String uuid, String favoriteName, String favoriteImage, String title, String description, String backgroundColor, Member member, int popularRate) { + public Book(String uuid, String favoriteName, String favoriteImage, String title, String description, String backgroundColor, Member member) { this.uuid = uuid; this.favoriteName = favoriteName; this.favoriteImage = favoriteImage; @@ -76,10 +75,9 @@ public Book(String uuid, String favoriteName, String favoriteImage, String title this.description = description; this.backgroundColor = backgroundColor; this.member = member; - this.popularRate = popularRate; } - public static Book of(String uuid, String favoriteName, String favoriteImage, String title, String description, String backgroundColor, Member member, int popularRate) { - return new Book(uuid, favoriteName, favoriteImage, title, description, backgroundColor, member, popularRate); + public static Book of(String uuid, String favoriteName, String favoriteImage, String title, String description, String backgroundColor, Member member) { + return new Book(uuid, favoriteName, favoriteImage, title, description, backgroundColor, member); } }