Skip to content

Commit

Permalink
feat: add a field to response
Browse files Browse the repository at this point in the history
  • Loading branch information
aiaiaiai1 committed Jan 16, 2025
1 parent e7bdca9 commit a7937fb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
package gymmi.workspace.response;

import gymmi.workspace.domain.entity.WorkoutHistory;
import gymmi.workspace.domain.WorkoutMetric;
import gymmi.workspace.domain.entity.WorkoutHistory;
import lombok.Getter;

import java.util.List;

@Getter
public class WorkoutContextResponse {

private String nickname;
private Integer totalContributedScore;
private Integer bestDailyScore;
private Integer totalWorkoutCount;
private Integer gabScoreFromFirst;
private List<WorkoutHistoryResponse> workoutHistories;

public WorkoutContextResponse(WorkoutMetric workoutMetric, int gabScoreFromFirst, List<WorkoutHistory> workoutHistories) {
this.nickname = workoutHistories.get(0).getWorker().getNickname();
this.totalContributedScore = workoutMetric.getSum();
this.bestDailyScore = workoutMetric.getBestWorkoutScore();
this.totalWorkoutCount = workoutMetric.getWorkoutCount();
Expand Down

0 comments on commit a7937fb

Please sign in to comment.