-
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.
- Loading branch information
Showing
4 changed files
with
67 additions
and
16 deletions.
There are no files selected for viewing
11 changes: 6 additions & 5 deletions
11
src/main/kotlin/com/depromeet/makers/domain/model/AttendanceStatus.kt
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
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
27 changes: 27 additions & 0 deletions
27
...ain/kotlin/com/depromeet/makers/presentation/restapi/dto/response/MyAttendanceResponse.kt
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,27 @@ | ||
package com.depromeet.makers.presentation.restapi.dto.response | ||
|
||
import com.depromeet.makers.domain.usecase.GetMemberAttendances | ||
import io.swagger.v3.oas.annotations.media.Schema | ||
|
||
data class MyAttendanceResponse( | ||
|
||
@Schema(description = "기수", example = "15") | ||
val generation: Int, | ||
|
||
@Schema(description = "오프라인 결석 점수", example = "1.0") | ||
val offlineAbsenceScore: Double, | ||
|
||
@Schema(description = "총 결석 점수 (지각: 0.5)", example = "2.5") | ||
val totalAbsenceScore: Double, | ||
|
||
val attendances: List<AttendanceResponse> | ||
) { | ||
companion object { | ||
fun fromDomain(getMemberAttendancesOutput: GetMemberAttendances.GetMemberAttendancesOutput) = MyAttendanceResponse( | ||
generation = getMemberAttendancesOutput.generation, | ||
offlineAbsenceScore = getMemberAttendancesOutput.offlineAbsenceScore, | ||
totalAbsenceScore = getMemberAttendancesOutput.totalAbsenceScore, | ||
attendances = getMemberAttendancesOutput.attendances.map { AttendanceResponse.fromDomain(it) } | ||
) | ||
} | ||
} |