Skip to content

Commit

Permalink
Merge pull request #308 from apeun-gidaechi/feature/307-fix-schedule-…
Browse files Browse the repository at this point in the history
…load-error

Fix/Schedule Load Error
  • Loading branch information
8954sood authored Oct 16, 2024
2 parents 10f33e9 + c36d04f commit 0c4df53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package com.seugi.data.schedule.mapper
import com.seugi.data.schedule.model.ScheduleModel
import com.seugi.network.schedule.response.ScheduleResponse
import kotlinx.collections.immutable.toImmutableList
import kotlinx.datetime.LocalDate

internal fun ScheduleResponse.toModel() = ScheduleModel(
id = id,
workspaceId = workspaceId,
date = date,
date = LocalDate(date.substring(0, 4).toInt(), date.substring(4, 6).toInt(), date.substring(6, 8).toInt()),
eventName = eventName,
eventContent = eventContent,
grade = grade.toImmutableList(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.seugi.network.schedule.response

import kotlinx.datetime.LocalDate

data class ScheduleResponse(
val id: Long,
val workspaceId: String,
val date: LocalDate,
val date: String,
val eventName: String,
val eventContent: String,
val grade: List<Int>,
Expand Down

0 comments on commit 0c4df53

Please sign in to comment.