Skip to content

Commit

Permalink
feat: FoodSearchResponseDto id 추가 반환 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeong-hyeok committed Oct 23, 2023
1 parent ae4629e commit 2e24f13
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit 2e24f13

Please sign in to comment.