Skip to content

Commit

Permalink
feat: FoodGetResponseDto 스코빌 지수 반환 추가 (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeong-hyeok committed Oct 24, 2023
1 parent 2e24f13 commit 18bf48a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import com.project.mapdagu.domain.food.entity.Food;

public record FoodGetResponseDto(Long id, String name, String image, Boolean isEvaluated, Integer score) {
public record FoodGetResponseDto(Long id, String name, String image, Integer scoville, Boolean isEvaluated, Integer score) {

public static FoodGetResponseDto of(Food food, Boolean isEvaluated, Integer score) {
return new FoodGetResponseDto(food.getId(), food.getName(), food.getImage(), isEvaluated, score);
return new FoodGetResponseDto(food.getId(), food.getName(), food.getImage(), food.getScoville(), isEvaluated, score);
}
}

0 comments on commit 18bf48a

Please sign in to comment.