-
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.
* Feat: RunningRecordMetricsDtoForAdd 추가 - 기존 RunningRecordMetricsDto에서 평균 페이스 필드 값이 없는 DTO * Feat: 러닝 저장 시 평균페이스 계산해서 정장하는 것으로 수정 - 평균페이스 계산 함수 추가 - 저장 시 평균페이스 계산 함수 호출 후 평균페이스 계산해서 저장 * Test: 러닝의 평균 페이스가 올바르게 계산되었는지 확인 * Rename: ~DtoForAdd에서 이름 ~ForAddDto로 파일명 변경 * Fix: 평균페이스 계산 로직 서비스 단에서 Pace의 from() 메서드로 이동 * Fix: 거리, 러닝 시간이 0일 경우 Pace(0, 0)으로 지정
- Loading branch information
Showing
5 changed files
with
75 additions
and
10 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
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
14 changes: 14 additions & 0 deletions
14
src/main/java/com/dnd/runus/presentation/v1/running/dto/RunningRecordMetricsForAddDto.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,14 @@ | ||
package com.dnd.runus.presentation.v1.running.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.time.Duration; | ||
|
||
public record RunningRecordMetricsForAddDto( | ||
@Schema(description = "멈춘 시간을 제외한 실제로 달린 시간", example = "123:45:56", format = "HH:mm:ss") | ||
Duration runningTime, | ||
@Schema(description = "달린 거리(m)", example = "1000") | ||
int distanceMeter, | ||
@Schema(description = "소모 칼로리(kcal)", example = "100") | ||
double calorie | ||
) { | ||
} |
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