From 2e24f139cc87d7b253a2f61a2c8d3f2539b6af6b Mon Sep 17 00:00:00 2001 From: kyeong-hyeok Date: Tue, 24 Oct 2023 00:18:12 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20FoodSearchResponseDto=20id=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=B0=98=ED=99=98=20(#58)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/food/dto/response/FoodSearchResponseDto.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/project/mapdagu/domain/food/dto/response/FoodSearchResponseDto.java b/src/main/java/com/project/mapdagu/domain/food/dto/response/FoodSearchResponseDto.java index 19e497e..5d9bc44 100644 --- a/src/main/java/com/project/mapdagu/domain/food/dto/response/FoodSearchResponseDto.java +++ b/src/main/java/com/project/mapdagu/domain/food/dto/response/FoodSearchResponseDto.java @@ -2,8 +2,8 @@ import com.project.mapdagu.domain.food.entity.Food; -public record FoodSearchResponseDto(String name, String image, Integer scoville) { +public record FoodSearchResponseDto(Long id, String name, String image, Integer scoville) { public static FoodSearchResponseDto from(Food food) { - return new FoodSearchResponseDto(food.getName(), food.getImage(), food.getScoville()); + return new FoodSearchResponseDto(food.getId(), food.getName(), food.getImage(), food.getScoville()); } }