Skip to content

Commit

Permalink
πŸ›Β :: out going, sleeping startAt endAt
Browse files Browse the repository at this point in the history
  • Loading branch information
wnsgur1 committed Apr 16, 2024
1 parent 75d26ac commit e593ce4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package kr.hs.dgsw.smartschool.remote.mapper

import android.util.Log
import kr.hs.dgsw.smartschool.data.utils.yearDateTimeToLocalDate
import kr.hs.dgsw.smartschool.domain.model.out.Out
import kr.hs.dgsw.smartschool.domain.model.out.OutItem
Expand All @@ -13,18 +14,20 @@ internal fun List<OutResponse>.toModel(): List<Out> =
this.map {
it.toOut()
}
internal fun OutResponse.toOut(): Out =
Out(
internal fun OutResponse.toOut(): Out {
return Out(
id = id,
reason = reason,
status = status.toOutStatus(),
student = student.toModel(),
rejectReason = rejectReason ?: "",
startOutDate = startOutDate.yearDateTimeToLocalDate().toString(),
endOutDate = endOutDate.yearDateTimeToLocalDate().toString(),
startOutDate = startOutDate,
endOutDate = endOutDate,
createdAt = createdAt.yearDateTimeToLocalDate().toString(),

modifiedAt = modifiedAt.yearDateTimeToLocalDate().toString()
)
}

internal fun OutDetailResponse.toOutItem(type: OutType): OutItem =
OutItem(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ data class OutResponse(
@field:SerializedName("status") val status: OutResponseStatus,
@field:SerializedName("student") val student: StudentResponse,
@field:SerializedName("rejectReason")val rejectReason: String?,
@field:SerializedName("startOutDate") val startOutDate: String,
@field:SerializedName("endOutDate") val endOutDate: String,
@field:SerializedName("startAt") val startOutDate: String,
@field:SerializedName("endAt") val endOutDate: String,
@field:SerializedName("createdAt") val createdAt: String,
@field:SerializedName("modifiedAt") val modifiedAt: String,
)

0 comments on commit e593ce4

Please sign in to comment.