diff --git a/core/data/src/main/java/com/droidknights/app/core/data/api/model/LevelResponse.kt b/core/data/src/main/java/com/droidknights/app/core/data/api/model/LevelResponse.kt deleted file mode 100644 index 2eef0d21..00000000 --- a/core/data/src/main/java/com/droidknights/app/core/data/api/model/LevelResponse.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.droidknights.app.core.data.api.model - -import kotlinx.serialization.SerialName -import kotlinx.serialization.Serializable - -/** - * TODO : SerialName 영어로 변경 - */ -@Serializable -internal enum class LevelResponse { - @SerialName("기타") - ETC, - - @SerialName("초급") - BASIC, - - @SerialName("중급") - INTERMEDIATE, - - @SerialName("고급") - ADVANCED -} diff --git a/core/data/src/main/java/com/droidknights/app/core/data/api/model/SessionResponse.kt b/core/data/src/main/java/com/droidknights/app/core/data/api/model/SessionResponse.kt index da447798..5e3ceaed 100644 --- a/core/data/src/main/java/com/droidknights/app/core/data/api/model/SessionResponse.kt +++ b/core/data/src/main/java/com/droidknights/app/core/data/api/model/SessionResponse.kt @@ -9,7 +9,6 @@ internal data class SessionResponse( val title: String, val content: String, val speakers: List, - val level: LevelResponse, val tags: List, val room: RoomResponse?, val startTime: LocalDateTime, diff --git a/core/data/src/main/java/com/droidknights/app/core/data/mapper/SessionMapper.kt b/core/data/src/main/java/com/droidknights/app/core/data/mapper/SessionMapper.kt index 29d6b713..dbc59cb8 100644 --- a/core/data/src/main/java/com/droidknights/app/core/data/mapper/SessionMapper.kt +++ b/core/data/src/main/java/com/droidknights/app/core/data/mapper/SessionMapper.kt @@ -1,10 +1,8 @@ package com.droidknights.app.core.data.mapper -import com.droidknights.app.core.data.api.model.LevelResponse import com.droidknights.app.core.data.api.model.RoomResponse import com.droidknights.app.core.data.api.model.SessionResponse import com.droidknights.app.core.data.api.model.SpeakerResponse -import com.droidknights.app.core.model.Level import com.droidknights.app.core.model.Room import com.droidknights.app.core.model.Session import com.droidknights.app.core.model.Speaker @@ -15,7 +13,6 @@ internal fun SessionResponse.toData(): Session = Session( title = this.title, content = this.content, speakers = this.speakers.map { it.toData() }, - level = this.level.toData(), tags = this.tags.map { Tag(it) }, room = this.room?.toData() ?: Room.ETC, startTime = this.startTime, @@ -23,13 +20,6 @@ internal fun SessionResponse.toData(): Session = Session( isBookmarked = false ) -internal fun LevelResponse.toData(): Level = when (this) { - LevelResponse.ETC -> Level.ETC - LevelResponse.BASIC -> Level.BASIC - LevelResponse.INTERMEDIATE -> Level.INTERMEDIATE - LevelResponse.ADVANCED -> Level.ADVANCED -} - internal fun RoomResponse.toData(): Room = when (this) { RoomResponse.ETC -> Room.ETC RoomResponse.TRACK1 -> Room.TRACK1 diff --git a/core/data/src/test/java/com/droidknights/app/core/data/repository/DefaultSessionRepositoryTest.kt b/core/data/src/test/java/com/droidknights/app/core/data/repository/DefaultSessionRepositoryTest.kt index a096fc76..d3736a2e 100644 --- a/core/data/src/test/java/com/droidknights/app/core/data/repository/DefaultSessionRepositoryTest.kt +++ b/core/data/src/test/java/com/droidknights/app/core/data/repository/DefaultSessionRepositoryTest.kt @@ -20,14 +20,14 @@ internal class DefaultSessionRepositoryTest : StringSpec() { "역직렬화 테스트" { val expected = Session( id = "1", - title = "Keynote", + title = "키노트", content = "", speakers = emptyList(), level = Level.ETC, tags = emptyList(), room = Room.ETC, - startTime = LocalDateTime(2023, 9, 12, 10, 45), - endTime = LocalDateTime(2023, 9, 12, 11, 0), + startTime = LocalDateTime(2024, 6, 11, 10, 40), + endTime = LocalDateTime(2024, 6, 11, 11, 0), isBookmarked = false ) val actual = repository.getSessions() diff --git a/core/model/src/main/java/com/droidknights/app/core/model/Session.kt b/core/model/src/main/java/com/droidknights/app/core/model/Session.kt index c37811c2..f2baa81d 100644 --- a/core/model/src/main/java/com/droidknights/app/core/model/Session.kt +++ b/core/model/src/main/java/com/droidknights/app/core/model/Session.kt @@ -7,7 +7,6 @@ data class Session( val title: String, val content: String, val speakers: List, - val level: Level, val tags: List, val room: Room, val startTime: LocalDateTime, diff --git a/feature/session/src/main/java/com/droidknights/app/feature/session/SessionCard.kt b/feature/session/src/main/java/com/droidknights/app/feature/session/SessionCard.kt index 67c26b38..93aefe03 100644 --- a/feature/session/src/main/java/com/droidknights/app/feature/session/SessionCard.kt +++ b/feature/session/src/main/java/com/droidknights/app/feature/session/SessionCard.kt @@ -28,7 +28,6 @@ import com.droidknights.app.core.designsystem.component.TextChip import com.droidknights.app.core.designsystem.theme.DarkGray import com.droidknights.app.core.designsystem.theme.KnightsTheme import com.droidknights.app.core.designsystem.theme.LightGray -import com.droidknights.app.core.model.Level import com.droidknights.app.core.model.Room import com.droidknights.app.core.model.Session import com.droidknights.app.core.model.Speaker @@ -204,7 +203,6 @@ private fun SessionCardPreview() { imageUrl = "https://picsum.photos/200", ), ), - level = Level.BASIC, tags = listOf( Tag("효율적인 코드베이스") ), diff --git a/feature/session/src/main/java/com/droidknights/app/feature/session/SessionDetailScreen.kt b/feature/session/src/main/java/com/droidknights/app/feature/session/SessionDetailScreen.kt index 1b91655f..f26f9335 100644 --- a/feature/session/src/main/java/com/droidknights/app/feature/session/SessionDetailScreen.kt +++ b/feature/session/src/main/java/com/droidknights/app/feature/session/SessionDetailScreen.kt @@ -45,7 +45,6 @@ import com.droidknights.app.core.designsystem.component.TopAppBarNavigationType import com.droidknights.app.core.designsystem.theme.DarkGray import com.droidknights.app.core.designsystem.theme.KnightsTheme import com.droidknights.app.core.designsystem.theme.LightGray -import com.droidknights.app.core.model.Level import com.droidknights.app.core.model.Room import com.droidknights.app.core.model.Session import com.droidknights.app.core.model.Speaker @@ -284,7 +283,6 @@ private val SampleSessionHasContent = Session( imageUrl = "", ), ), - level = Level.ADVANCED, tags = listOf(Tag("Dev Environment")), room = Room.TRACK1, startTime = LocalDateTime.parse("2023-09-12T11:00:00.000"), @@ -303,7 +301,6 @@ private val SampleSessionNoContent = Session( imageUrl = "", ), ), - level = Level.ADVANCED, tags = listOf(Tag("Dev Environment")), room = Room.TRACK1, startTime = LocalDateTime.parse("2023-09-12T11:00:00.000"),