Skip to content

Commit

Permalink
Merge pull request #163 from Team-Motivoo/chore/#162-home_reponse_data
Browse files Browse the repository at this point in the history
[CHORE] add home response
  • Loading branch information
jun02160 authored May 2, 2024
2 parents 09efb62 + d88d0e4 commit 8ff1e23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@Builder
public record StepStatusResponse(
@JsonProperty("user_type") String userType,
@JsonProperty("opponent_user_type") String opponentUserType,
@JsonProperty("user_id") Long userId,
@JsonProperty("user_goal_step_count") Integer userGoalStepCount,
@JsonProperty("opponent_user_id") Long opponentUserId,
Expand All @@ -20,6 +21,7 @@ public record StepStatusResponse(
public static StepStatusResponse of(StepStatusResult result) {
return StepStatusResponse.builder()
.userType(result.userType())
.opponentUserType(result.opponentUserType())
.userId(result.userId())
.userGoalStepCount(result.userGoalStepCount())
.opponentUserId(result.opponentUserId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@Builder
public record StepStatusResult(
String userType,
String opponentUserType,
Long userId,
Integer userGoalStepCount,
Long opponentUserId,
Expand All @@ -18,6 +19,7 @@ public record StepStatusResult(
public static StepStatusResult of(User user, User opponentUser, int myGoalStep, int opponentGoalStep, Boolean status, Boolean imgCompleted) {
return StepStatusResult.builder()
.userType(user.getType().getValue())
.opponentUserType(opponentUser.getType().getValue())
.userId(user.getId())
.userGoalStepCount(myGoalStep)
.opponentUserId(opponentUser.getId())
Expand Down

0 comments on commit 8ff1e23

Please sign in to comment.