diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/ReservationMapper.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/ReservationMapper.kt deleted file mode 100644 index e69de29bb..000000000 diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/ReservationTicketMapper.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/ReservationTicketMapper.kt deleted file mode 100644 index 4f17bb0f2..000000000 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/ReservationTicketMapper.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.festago.festago.presentation.mapper - -import com.festago.festago.model.ReservationTicket -import com.festago.festago.presentation.model.ReservationTicketUiModel - -fun ReservationTicket.toPresentation() = ReservationTicketUiModel( - id = id, - remainAmount = remainAmount, - ticketType = ticketType, - totalAmount = totalAmount, -) - -fun ReservationTicketUiModel.toDomain() = ReservationTicket( - id = id, - remainAmount = remainAmount, - ticketType = ticketType, - totalAmount = totalAmount, -) diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/StageMapper.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/StageMapper.kt deleted file mode 100644 index f6ca17e9b..000000000 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/StageMapper.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.festago.festago.presentation.mapper - -import com.festago.festago.model.Stage -import com.festago.festago.presentation.model.StageUiModel - -fun Stage.toPresentation() = StageUiModel( - id = id, - startTime = startTime, -) - -fun StageUiModel.toDomain() = Stage( - id = id, - startTime = startTime, -) diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/TicketCodeMapper.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/TicketCodeMapper.kt deleted file mode 100644 index 56117dafd..000000000 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/TicketCodeMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.festago.festago.presentation.mapper - -import com.festago.festago.model.TicketCode -import com.festago.festago.presentation.model.TicketCodeUiModel - -fun TicketCode.toPresentation(): TicketCodeUiModel = TicketCodeUiModel(code = code, period = period) - -fun TicketCodeUiModel.toDomain(): TicketCode = TicketCode(code = code, period = period) diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/TicketMapper.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/TicketMapper.kt deleted file mode 100644 index 9c8506a44..000000000 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/TicketMapper.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.festago.festago.presentation.mapper - -import com.festago.festago.model.Ticket -import com.festago.festago.presentation.model.TicketUiModel - -fun Ticket.toPresentation(): TicketUiModel = TicketUiModel( - id = id, - number = number, - entryTime = entryTime, - condition = condition.toPresentation(), - stage = stage.toPresentation(), - reserveAt = reserveAt, - festivalId = festivalTicket.id, - festivalName = festivalTicket.name, - festivalThumbnail = festivalTicket.thumbnail, -) - -fun List.toPresentation(): List = - this.map { ticket -> ticket.toPresentation() } diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/TicketStateMapper.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/TicketStateMapper.kt deleted file mode 100644 index c74b34fd7..000000000 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/TicketStateMapper.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.festago.festago.presentation.mapper - -import com.festago.festago.model.TicketCondition -import com.festago.festago.presentation.model.TicketConditionUiModel - -fun TicketCondition.toPresentation(): TicketConditionUiModel = - when (this) { - TicketCondition.BEFORE_ENTRY -> TicketConditionUiModel.BEFORE_ENTRY - TicketCondition.AFTER_ENTRY -> TicketConditionUiModel.AFTER_ENTRY - TicketCondition.AWAY -> TicketConditionUiModel.AWAY - } - -fun TicketConditionUiModel.toDomain(): TicketCondition = - when (this) { - TicketConditionUiModel.BEFORE_ENTRY -> TicketCondition.BEFORE_ENTRY - TicketConditionUiModel.AFTER_ENTRY -> TicketCondition.AFTER_ENTRY - TicketConditionUiModel.AWAY -> TicketCondition.AWAY - } diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/UserProfileMapper.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/UserProfileMapper.kt deleted file mode 100644 index a959a0af5..000000000 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/mapper/UserProfileMapper.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.festago.festago.presentation.mapper - -import com.festago.festago.model.UserProfile -import com.festago.festago.presentation.model.UserProfileUiModel - -fun UserProfile.toPresentation(): UserProfileUiModel = UserProfileUiModel( - memberId = memberId, - nickName = nickName, - profileImage = profileImage, -) diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/model/ReservationTicketUiModel.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/model/ReservationTicketUiModel.kt deleted file mode 100644 index add00010f..000000000 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/model/ReservationTicketUiModel.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.festago.festago.presentation.model - -import android.os.Parcelable -import kotlinx.parcelize.Parcelize - -@Parcelize -data class ReservationTicketUiModel( - val id: Int, - val remainAmount: Int, - val ticketType: String, - val totalAmount: Int, -) : Parcelable diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/model/StageUiModel.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/model/StageUiModel.kt deleted file mode 100644 index 7ab8bc6e4..000000000 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/model/StageUiModel.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.festago.festago.presentation.model - -import java.time.LocalDateTime - -data class StageUiModel( - val id: Int = -1, - val startTime: LocalDateTime = LocalDateTime.MIN, -) diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/model/TicketCodeUiModel.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/model/TicketCodeUiModel.kt deleted file mode 100644 index 6c7d699b1..000000000 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/model/TicketCodeUiModel.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.festago.festago.presentation.model - -data class TicketCodeUiModel( - val code: String, - val period: Int, -) { - companion object { - val EMPTY = TicketCodeUiModel(code = "code", period = 0) - } -} diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/model/TicketConditionUiModel.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/model/TicketConditionUiModel.kt deleted file mode 100644 index 53fabaa82..000000000 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/model/TicketConditionUiModel.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.festago.festago.presentation.model - -import androidx.annotation.StringRes -import com.festago.festago.R - -enum class TicketConditionUiModel(@StringRes val stateName: Int) { - - BEFORE_ENTRY(R.string.all_ticket_state_before_entry), - AFTER_ENTRY(R.string.all_ticket_state_after_entry), - AWAY(R.string.all_ticket_state_away), -} diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/model/TicketUiModel.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/model/TicketUiModel.kt deleted file mode 100644 index 432bf2ae6..000000000 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/model/TicketUiModel.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.festago.festago.presentation.model - -import java.time.LocalDateTime - -data class TicketUiModel( - val id: Long = -1, - val number: Int = -1, - val entryTime: LocalDateTime = LocalDateTime.MIN, - val reserveAt: LocalDateTime = LocalDateTime.MIN, - val condition: TicketConditionUiModel = TicketConditionUiModel.BEFORE_ENTRY, - val stage: StageUiModel = StageUiModel(), - val festivalId: Int = -1, - val festivalName: String = "", - val festivalThumbnail: String = "", -) diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/model/UserProfileUiModel.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/model/UserProfileUiModel.kt deleted file mode 100644 index 223f24371..000000000 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/model/UserProfileUiModel.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.festago.festago.presentation.model - -data class UserProfileUiModel( - val memberId: Long = -1, - val nickName: String = "", - val profileImage: String = "", -) diff --git a/android/festago/app/src/main/java/com/festago/festago/presentation/ui/ticketentry/TicketEntryActivity.kt b/android/festago/app/src/main/java/com/festago/festago/presentation/ui/ticketentry/TicketEntryActivity.kt index 6d7a3184f..ec654e3d0 100644 --- a/android/festago/app/src/main/java/com/festago/festago/presentation/ui/ticketentry/TicketEntryActivity.kt +++ b/android/festago/app/src/main/java/com/festago/festago/presentation/ui/ticketentry/TicketEntryActivity.kt @@ -8,7 +8,6 @@ import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity import androidx.core.content.res.ResourcesCompat import com.festago.festago.databinding.ActivityTicketEntryBinding -import com.festago.festago.presentation.mapper.toPresentation import com.festago.festago.presentation.ui.FestagoViewModelFactory import com.google.zxing.BarcodeFormat import com.journeyapps.barcodescanner.BarcodeEncoder @@ -66,7 +65,7 @@ class TicketEntryActivity : AppCompatActivity() { private fun handleSuccess(uiState: TicketEntryUiState.Success) { binding.successState = uiState - val ticketCode = uiState.ticketCode.toPresentation() + val ticketCode = uiState.ticketCode val bitmap = BarcodeEncoder().encodeBitmap( ticketCode.code,