diff --git a/src/main/java/com/dnd/runus/presentation/v1/running/dto/RunningRecordMetricsDtoForAdd.java b/src/main/java/com/dnd/runus/presentation/v1/running/dto/RunningRecordMetricsForAddDto.java similarity index 84% rename from src/main/java/com/dnd/runus/presentation/v1/running/dto/RunningRecordMetricsDtoForAdd.java rename to src/main/java/com/dnd/runus/presentation/v1/running/dto/RunningRecordMetricsForAddDto.java index 05e460fc..4a0d296a 100644 --- a/src/main/java/com/dnd/runus/presentation/v1/running/dto/RunningRecordMetricsDtoForAdd.java +++ b/src/main/java/com/dnd/runus/presentation/v1/running/dto/RunningRecordMetricsForAddDto.java @@ -1,10 +1,9 @@ package com.dnd.runus.presentation.v1.running.dto; -import com.dnd.runus.domain.common.Pace; import io.swagger.v3.oas.annotations.media.Schema; import java.time.Duration; -public record RunningRecordMetricsDtoForAdd( +public record RunningRecordMetricsForAddDto( @Schema(description = "멈춘 시간을 제외한 실제로 달린 시간", example = "123:45:56", format = "HH:mm:ss") Duration runningTime, @Schema(description = "달린 거리(m)", example = "1000") diff --git a/src/main/java/com/dnd/runus/presentation/v1/running/dto/request/RunningRecordRequest.java b/src/main/java/com/dnd/runus/presentation/v1/running/dto/request/RunningRecordRequest.java index 8f794388..5cccd691 100644 --- a/src/main/java/com/dnd/runus/presentation/v1/running/dto/request/RunningRecordRequest.java +++ b/src/main/java/com/dnd/runus/presentation/v1/running/dto/request/RunningRecordRequest.java @@ -3,7 +3,7 @@ import com.dnd.runus.global.constant.RunningEmoji; import com.dnd.runus.global.exception.BusinessException; import com.dnd.runus.global.exception.type.ErrorType; -import com.dnd.runus.presentation.v1.running.dto.RunningRecordMetricsDtoForAdd; +import com.dnd.runus.presentation.v1.running.dto.RunningRecordMetricsForAddDto; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; @@ -34,7 +34,7 @@ public record RunningRecordRequest( @Schema(description = "목표 달성 모드, normal: 목표 설정X, challenge: 챌린지, goal: 개인 목표") RunningAchievementMode achievementMode, @NotNull - RunningRecordMetricsDtoForAdd runningData + RunningRecordMetricsForAddDto runningData ) { public RunningRecordRequest { if (startAt.isAfter(endAt)) { diff --git a/src/test/java/com/dnd/runus/application/running/RunningRecordServiceTest.java b/src/test/java/com/dnd/runus/application/running/RunningRecordServiceTest.java index e06b6941..5d185e46 100644 --- a/src/test/java/com/dnd/runus/application/running/RunningRecordServiceTest.java +++ b/src/test/java/com/dnd/runus/application/running/RunningRecordServiceTest.java @@ -21,7 +21,7 @@ import com.dnd.runus.global.constant.MemberRole; import com.dnd.runus.global.constant.RunningEmoji; import com.dnd.runus.global.exception.NotFoundException; -import com.dnd.runus.presentation.v1.running.dto.RunningRecordMetricsDtoForAdd; +import com.dnd.runus.presentation.v1.running.dto.RunningRecordMetricsForAddDto; import com.dnd.runus.presentation.v1.running.dto.request.RunningAchievementMode; import com.dnd.runus.presentation.v1.running.dto.request.RunningRecordRequest; import com.dnd.runus.presentation.v1.running.dto.request.RunningRecordWeeklySummaryType; @@ -211,7 +211,7 @@ void addRunningRecord_challenge() { null, null, RunningAchievementMode.CHALLENGE, - new RunningRecordMetricsDtoForAdd(Duration.ofSeconds(10_100), 10_000, 500.0)); + new RunningRecordMetricsForAddDto(Duration.ofSeconds(10_100), 10_000, 500.0)); Member member = new Member(MemberRole.USER, "nickname1"); RunningRecord expected = createRunningRecord(request, member); @@ -251,7 +251,7 @@ void addRunningRecord_goal_time_success() { null, 1200, RunningAchievementMode.GOAL, - new RunningRecordMetricsDtoForAdd(Duration.ofSeconds(10_100), 10_000, 500.0)); + new RunningRecordMetricsForAddDto(Duration.ofSeconds(10_100), 10_000, 500.0)); Member member = new Member(MemberRole.USER, "nickname1"); RunningRecord expected = createRunningRecord(request, member); @@ -290,7 +290,7 @@ void addRunningRecord_goal_time_fail() { null, 20_000, RunningAchievementMode.GOAL, - new RunningRecordMetricsDtoForAdd(Duration.ofSeconds(10_100), 10_000, 500.0)); + new RunningRecordMetricsForAddDto(Duration.ofSeconds(10_100), 10_000, 500.0)); Member member = new Member(MemberRole.USER, "nickname1"); RunningRecord expected = createRunningRecord(request, member); @@ -329,7 +329,7 @@ void addRunningRecord_goal_distance() { 5_000, null, RunningAchievementMode.GOAL, - new RunningRecordMetricsDtoForAdd(Duration.ofSeconds(10_100), 10_000, 500.0)); + new RunningRecordMetricsForAddDto(Duration.ofSeconds(10_100), 10_000, 500.0)); Member member = new Member(MemberRole.USER, "nickname1"); RunningRecord expected = createRunningRecord(request, member); @@ -368,7 +368,7 @@ void addRunningRecord_goal_distance_same_value() { 10_000, null, RunningAchievementMode.GOAL, - new RunningRecordMetricsDtoForAdd(Duration.ofSeconds(10_100), 10_000, 500.0)); + new RunningRecordMetricsForAddDto(Duration.ofSeconds(10_100), 10_000, 500.0)); Member member = new Member(MemberRole.USER, "nickname1"); RunningRecord expected = createRunningRecord(request, member); @@ -406,7 +406,7 @@ void addRunningRecord_check_cal_pace() { null, null, RunningAchievementMode.NORMAL, - new RunningRecordMetricsDtoForAdd(Duration.ofSeconds(1_668), 3_280, 500.0)); + new RunningRecordMetricsForAddDto(Duration.ofSeconds(1_668), 3_280, 500.0)); Member member = new Member(MemberRole.USER, "nickname1"); RunningRecord expected = createRunningRecord(request, member); @@ -526,7 +526,7 @@ void getWeeklySummary_Duration() { private RunningRecord createRunningRecord(RunningRecordRequest request, Member member) { - RunningRecordMetricsDtoForAdd runningData = request.runningData(); + RunningRecordMetricsForAddDto runningData = request.runningData(); double calPace = (double) runningData.runningTime().toSeconds() / runningData.distanceMeter()