From b2e13a939c081c9304628245d0b4f8d675efe9c7 Mon Sep 17 00:00:00 2001 From: Due_it <48638700+FhRh@users.noreply.github.com> Date: Thu, 26 Sep 2024 19:31:29 +0900 Subject: [PATCH] =?UTF-8?q?[Server]=20Fix=20:=20url=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=88=98=EC=A0=95=20(#49)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat : recipe 엔티티 속성 추가 * feat : recipe 주재료 엔티티 추가 * fix : link 속성을 없애고 id를 통해 url을 반환한다. --- .../com/sundaegukbap/banchango/recipe/domain/Recipe.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Server/banchango/src/main/java/com/sundaegukbap/banchango/recipe/domain/Recipe.java b/Server/banchango/src/main/java/com/sundaegukbap/banchango/recipe/domain/Recipe.java index 94420da..d241048 100644 --- a/Server/banchango/src/main/java/com/sundaegukbap/banchango/recipe/domain/Recipe.java +++ b/Server/banchango/src/main/java/com/sundaegukbap/banchango/recipe/domain/Recipe.java @@ -32,8 +32,6 @@ public class Recipe { private String image1; private String image2; @NotNull - private String link; - @NotNull private int servings; @NotNull private int cookingTime; @@ -52,7 +50,6 @@ public Recipe(Long id, String name, String bestName, String introduction, String this.introduction = introduction; this.image1 = image1; this.image2 = image2; - this.link = link; this.servings = servings; this.cookingTime = cookingTime; this.difficulty = difficulty; @@ -60,4 +57,8 @@ public Recipe(Long id, String name, String bestName, String introduction, String this.byIngredient = byIngredient; this.bySituation = bySituation; } + + public String getLink(){ + return "https://m.10000recipe.com/recipe/"+this.id; + } }