Skip to content

Commit

Permalink
:recylce: refactor: 영양성분 총합 Dto 중 누락된 속성 추가 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
synoti21 committed Oct 11, 2023
1 parent f2ecba0 commit 06dae94
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.time.LocalDate;

@Getter
@AllArgsConstructor
public class ResponseNutritionSumByDateDto {

Long userId;
LocalDate checkDate; //조회한 날짜
int nutritionSumType; //조회할 기간을 나타내는 코드. {1: 특정 날짜, 7: 최근 7일간, 30: 최근 한달간}

int totalKcal;
int totalCarbohydrate;
int totalProtein;
Expand All @@ -16,7 +23,7 @@ public class ResponseNutritionSumByDateDto {
double ratioProtein;
double ratioFat;

public static ResponseNutritionSumByDateDto of (int totalKcal, int totalCarbohydrate, int totalProtein, int totalFat, double ratioKcal, double ratioCarbohydrate, double ratioProtein, double ratioFat){
return new ResponseNutritionSumByDateDto(totalKcal, totalCarbohydrate, totalProtein, totalFat, ratioKcal, ratioCarbohydrate, ratioProtein, ratioFat);
public static ResponseNutritionSumByDateDto of (Long userId, LocalDate checkDate, int nutritionSumType, int totalKcal, int totalCarbohydrate, int totalProtein, int totalFat, double ratioKcal, double ratioCarbohydrate, double ratioProtein, double ratioFat){
return new ResponseNutritionSumByDateDto(userId, checkDate, nutritionSumType, totalKcal, totalCarbohydrate, totalProtein, totalFat, ratioKcal, ratioCarbohydrate, ratioProtein, ratioFat);
}
}

0 comments on commit 06dae94

Please sign in to comment.