-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from CAUSOLDOUTMEN/feature/18-feat-nutrition_rank
feat: 영양소 및 음식 조회 (Best, Worst) 로직 구현 (#18)
- Loading branch information
Showing
6 changed files
with
167 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/com/diareat/diareat/food/dto/ResponseFoodRankDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.diareat.diareat.food.dto; | ||
|
||
import com.diareat.diareat.food.domain.Food; | ||
import com.diareat.diareat.user.domain.BaseNutrition; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalTime; | ||
import java.util.List; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public class ResponseFoodRankDto { | ||
|
||
private Long userId; | ||
private List<ResponseFoodDto> rankFoodList; | ||
private LocalDate startDate; //해당 날짜로부터 7일전까지 | ||
private boolean isBest; //isBest = true 이면 Best 3, false 이면 Worst 3 | ||
|
||
public static ResponseFoodRankDto of(Long userId, List<ResponseFoodDto> rankFoodList, LocalDate startDate, boolean isBest) { | ||
return new ResponseFoodRankDto(userId, rankFoodList, startDate, isBest); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters