Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.poti.android.domain.model.history

import com.poti.android.domain.type.ParticipantStatusType

data class PartySummary(
val imageUrl: String,
val artist: String,
val title: String,
val partyState: ParticipantStatusType,
)

data class ProgressInfo(
val step: Int,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package com.poti.android.domain.model.history

import com.poti.android.domain.type.ParticipantStatusType

data class ParticipantDetail(
val recruitId: Long,
val userState: ParticipantStatusType,
val partySummary: PartySummary,
val progressInfo: ProgressInfo,
val depositInfo: ParticipantDepositInfo,
val shippingInfo: ParticipantShippingInfo,
val recruiterName: String,
val recruiterProfileUrl: String,
val recruiterRating: String,
)

data class ParticipantDepositInfo(
val items: List<DepositItem>,
val totalAmount: Int,
val depositStatus: DepositStatus,
)

sealed interface DepositStatus {
val accountNumber: String
val dueDate: String

data class DepositWait(
override val accountNumber: String,
override val dueDate: String,
) : DepositStatus

data class DepositCheck(
override val accountNumber: String,
override val dueDate: String,
) : DepositStatus

object DepositDone : DepositStatus {
override val accountNumber: String = ""
override val dueDate: String = ""
}
}

sealed interface DepositItem {
val name: String
val price: Int

data class DeliveryItem(
override val name: String,
override val price: Int,
) : DepositItem

data class MemberItem(
override val name: String,
override val price: Int,
) : DepositItem
}

data class ParticipantShippingInfo(
val recipient: String,
val zipcode: String,
val address: String,
val phone: String,
val deliveryMethod: String,
val trackingNumber: String?,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.poti.android.domain.model.history

import com.poti.android.domain.type.ParticipantStatusType

data class RecruiterDetail(
val recruitId: Long,
val partySummary: PartySummary,
val progressInfo: ProgressInfo,
val participantInfoList: List<ParticipantInfo>,
val participantCount: Int = participantInfoList.size,
)

data class ParticipantInfo(
val userId: Long,
val memberNames: String,
val participantState: ParticipantStatusType,
val userInfo: String,
val deliveryMethod: String,
val deliveryPrice: Int,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.poti.android.domain.type

enum class ParticipantStatusType {
RECRUIT_ING,
RECRUIT_DONE,

DEPOSIT_WAIT,
DEPOSIT_CHECK,
DEPOSIT_DONE,

DELIVERY_WAIT,
DELIVERY_START,
DELIVERY_DONE,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
package com.poti.android.presentation.history

import com.poti.android.R
import com.poti.android.core.designsystem.component.display.PotiItemOptionType
import com.poti.android.domain.type.ParticipantStatusType
import com.poti.android.presentation.history.component.StateLabelStage
import com.poti.android.presentation.history.component.StateLabelStatus
import com.poti.android.presentation.history.model.PartySummaryUiModel
import com.poti.android.presentation.history.model.ProgressUiModel
import com.poti.android.presentation.history.participant.model.ActionButtonState
import com.poti.android.presentation.history.participant.model.DepositInfoUiModel
import com.poti.android.presentation.history.participant.model.DepositItemUiModel
import com.poti.android.presentation.history.participant.model.ParticipantDetailActionType
import com.poti.android.presentation.history.participant.model.ParticipantDetailModalUiModel
import com.poti.android.presentation.history.participant.model.ParticipantDetailUiModel
import com.poti.android.presentation.history.participant.model.ShippingInfoUiModel
import com.poti.android.presentation.history.recruiter.model.ParticipantInfoUiModel
import com.poti.android.presentation.history.recruiter.model.RecruiterDetailUiModel

object DummyParticipantManageDetail {
// ========================================================================
// 1. Shared Common Data
// ========================================================================

private val commonPartySummary = PartySummaryUiModel(
artist = "NewJeans",
title = "How Sweet ์œ„๋ฒ„์Šค ํŠน์ „ ๋ถ„์ฒ ",
imageUrl = "https://picsum.photos/200",
partyStage = StateLabelStage.RECRUIT,
partyStatus = StateLabelStatus.DONE,
)

private val commonDepositItems = listOf(
DepositItemUiModel(name = "ํ•ด๋ฆฐ ํฌํ† ์นด๋“œ", price = 15000, type = PotiItemOptionType.MEMBER),
DepositItemUiModel(name = "GS25 ๋ฐ˜๊ฐ’ํƒ๋ฐฐ", price = 1800, type = PotiItemOptionType.DELIVERY),
)

private val commonShippingInfo = ShippingInfoUiModel(
recipient = "๊น€ํฌํ‹ฐ",
zipcode = "06000",
address = "์„œ์šธํŠน๋ณ„์‹œ ๊ฐ•๋‚จ๊ตฌ ํ…Œํ—ค๋ž€๋กœ 123 ํฌํ‹ฐํƒ€์›Œ 101ํ˜ธ",
phone = "010-1234-5678",
deliveryMethod = "GS25 ๋ฐ˜๊ฐ’ํƒ๋ฐฐ",
trackingNumber = null,
)

// ========================================================================
// 2. Recruiter View Data
// ========================================================================

val recruiterRecruitStep = RecruiterDetailUiModel(
recruitId = 1,
artistInfo = PartySummaryUiModel(
imageUrl = "",
artist = "IVE(์•„์ด๋ธŒ)",
title = "I've IVE ์œ„๋“œ๋ฎค ๋ถ„์ฒ ",
partyStage = StateLabelStage.RECRUIT,
partyStatus = StateLabelStatus.WAIT,
),
progressInfo = ProgressUiModel(
step = 0,
guideText = "๋ชจ์ง‘์ด ์‹œ์ž‘๋˜์—ˆ์Šต๋‹ˆ๋‹ค.",
),
participantInfoList = listOf(
ParticipantInfoUiModel(
userId = 101,
memberNames = "์žฅ์›์˜",
participantState = ParticipantStatusType.RECRUIT_DONE,
userInfo = "ํฌํ‹ฐ",
deliveryMethod = "GS๋ฐ˜๊ฐ’ํƒ๋ฐฐ",
deliveryPrice = 1800,
),
),
participantCount = 1,
topBarTitleRes = R.string.history_ongoing_title,
)

val recruiterDepositStep = RecruiterDetailUiModel(
recruitId = 2,
artistInfo = PartySummaryUiModel(
imageUrl = "",
artist = "aespa(์—์ŠคํŒŒ)",
title = "Armageddon ๋ฏธ๊ณตํฌ ๋ถ„์ฒ ",
partyStage = StateLabelStage.DEPOSIT,
partyStatus = StateLabelStatus.WAIT,
),
progressInfo = ProgressUiModel(
step = 1,
guideText = "์ž…๊ธˆ์„ ํ™•์ธํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.",
),
participantInfoList = listOf(
ParticipantInfoUiModel(
userId = 201,
memberNames = "์นด๋ฆฌ๋‚˜, ์œˆํ„ฐ",
participantState = ParticipantStatusType.DEPOSIT_DONE,
userInfo = "๊น€์ฒ ์ˆ˜",
deliveryMethod = "CU๋ผ๋ฆฌํƒ๋ฐฐ",
deliveryPrice = 1600,
),
ParticipantInfoUiModel(
userId = 202,
memberNames = "๋‹๋‹",
participantState = ParticipantStatusType.DEPOSIT_WAIT,
userInfo = "์ด์˜ํฌ",
deliveryMethod = "์ค€๋“ฑ๊ธฐ",
deliveryPrice = 1800,
),
ParticipantInfoUiModel(
userId = 203,
memberNames = "์ง€์ ค",
participantState = ParticipantStatusType.DEPOSIT_CHECK,
userInfo = "๋ฐ•๋ฏผ์ˆ˜",
deliveryMethod = "์ผ๋ฐ˜ํƒ๋ฐฐ",
deliveryPrice = 3500,
),
),
participantCount = 3,
topBarTitleRes = R.string.history_ongoing_title,
)

val recruiterDeliveryDoneStep = RecruiterDetailUiModel(
recruitId = 3,
artistInfo = PartySummaryUiModel(
imageUrl = "",
artist = "NewJeans",
title = "How Sweet ์œ„๋ฒ„์Šค ํŠน์ „",
partyStage = StateLabelStage.DELIVERY,
partyStatus = StateLabelStatus.DONE,
),
progressInfo = ProgressUiModel(
step = 2,
guideText = "๊ฑฐ๋ž˜๊ฐ€ ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.",
),
participantInfoList = listOf(
ParticipantInfoUiModel(
userId = 301,
memberNames = "๋ฏผ์ง€, ํ•˜๋‹ˆ",
participantState = ParticipantStatusType.DELIVERY_DONE,
userInfo = "์ตœ์˜ˆ๋‚˜",
deliveryMethod = "GS๋ฐ˜๊ฐ’ํƒ๋ฐฐ",
deliveryPrice = 1800,
),
ParticipantInfoUiModel(
userId = 302,
memberNames = "๋‹ค๋‹ˆ์—˜",
participantState = ParticipantStatusType.DELIVERY_DONE,
userInfo = "์กฐ์œ ๋ฆฌ",
deliveryMethod = "GS๋ฐ˜๊ฐ’ํƒ๋ฐฐ",
deliveryPrice = 1800,
),
),
participantCount = 2,
topBarTitleRes = R.string.history_ongoing_title_done,
)

// ========================================================================
// 3. Participant View Data
// ========================================================================
val participantDetailIngRecruit = ParticipantDetailUiModel(
recruitId = 1001L,
userState = ParticipantStatusType.RECRUIT_DONE,
partySummaryInfo = commonPartySummary.copy(
partyStatus = StateLabelStatus.ING,
),
progressInfo = ProgressUiModel(
step = 1,
guideText = "๋‹ค๋ฅธ ์ฐธ์—ฌ์ž๋“ค์„ ๊ธฐ๋‹ค๋ฆฌ๊ณ  ์žˆ์–ด์š”",
),
depositInfo = DepositInfoUiModel(
items = commonDepositItems,
totalAmount = 16800,
accountNumber = "์นด์นด์˜ค๋ฑ…ํฌ 3333-01-1234567",
dueDate = "2024.12.31 23:59๊นŒ์ง€",
stage = StateLabelStage.DEPOSIT,
status = StateLabelStatus.WAIT,
),
shippingInfo = commonShippingInfo,
recruiterName = "ํฌํ‹ฐ ์ด๋Œ€",
recruiterProfileUrl = "https://picsum.photos/id/64/200",
recruiterRating = "4.8",
topBarTitleResId = R.string.history_participant_detail_title,
actionButtonState = ActionButtonState.Visible(
textResId = R.string.history_deposit_done_button,
actionType = ParticipantDetailActionType.OPEN_DEPOSIT_INPUT,
),
activeModal = ParticipantDetailModalUiModel.None,
isTrackingInfoVisible = false,
isParticipantStatusVisible = false,
)

val participantDetailWaitDeposit = ParticipantDetailUiModel(
recruitId = 1001L,
userState = ParticipantStatusType.DEPOSIT_WAIT,
partySummaryInfo = commonPartySummary,
progressInfo = ProgressUiModel(
step = 1,
guideText = "์ž…๊ธˆ์„ ํ™•์ธํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.",
),
depositInfo = DepositInfoUiModel(
items = commonDepositItems,
totalAmount = 16800,
accountNumber = "์นด์นด์˜ค๋ฑ…ํฌ 3333-01-1234567",
dueDate = "2024.12.31 23:59๊นŒ์ง€",
stage = StateLabelStage.DEPOSIT,
status = StateLabelStatus.WAIT,
),
shippingInfo = commonShippingInfo,
recruiterName = "ํฌํ‹ฐ ์ด๋Œ€",
recruiterProfileUrl = "https://picsum.photos/id/64/200",
recruiterRating = "4.8",
topBarTitleResId = R.string.history_participant_detail_title,
actionButtonState = ActionButtonState.Visible(
textResId = R.string.history_deposit_done_button,
actionType = ParticipantDetailActionType.OPEN_DEPOSIT_INPUT,
),
activeModal = ParticipantDetailModalUiModel.None,
isTrackingInfoVisible = false,
isParticipantStatusVisible = false,
)

val participantDetailCheckDeposit = ParticipantDetailUiModel(
recruitId = 1002L,
userState = ParticipantStatusType.DEPOSIT_CHECK,
partySummaryInfo = commonPartySummary,
progressInfo = ProgressUiModel(
step = 1,
guideText = "์ž…๊ธˆ์„ ํ™•์ธํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.",
),
depositInfo = DepositInfoUiModel(
items = commonDepositItems,
totalAmount = 16800,
accountNumber = "์นด์นด์˜ค๋ฑ…ํฌ 3333-01-1234567",
dueDate = "2024.12.31 23:59๊นŒ์ง€",
stage = StateLabelStage.DEPOSIT,
status = StateLabelStatus.CHECK,
),
shippingInfo = commonShippingInfo,
recruiterName = "ํฌํ‹ฐ ์ด๋Œ€",
recruiterProfileUrl = "https://picsum.photos/id/64/200",
recruiterRating = "4.8",
topBarTitleResId = R.string.history_participant_detail_title,
actionButtonState = ActionButtonState.Gone,
activeModal = ParticipantDetailModalUiModel.None,
isTrackingInfoVisible = false,
isParticipantStatusVisible = false,
)

val participantDetailDeliveryStart = ParticipantDetailUiModel(
recruitId = 1003L,
userState = ParticipantStatusType.DELIVERY_START,
partySummaryInfo = commonPartySummary.copy(
partyStage = StateLabelStage.DELIVERY,
partyStatus = StateLabelStatus.START,
),
progressInfo = ProgressUiModel(
step = 2,
guideText = "๋ฐฐ์†ก์ด ์‹œ์ž‘๋˜์—ˆ์Šต๋‹ˆ๋‹ค.",
),
depositInfo = DepositInfoUiModel(
items = commonDepositItems,
totalAmount = 16800,
accountNumber = null,
dueDate = null,
stage = StateLabelStage.DEPOSIT,
status = StateLabelStatus.DONE,
),
shippingInfo = commonShippingInfo.copy(
trackingNumber = "1234-5678-9012",
),
recruiterName = "ํฌํ‹ฐ ์ด๋Œ€",
recruiterProfileUrl = "https://picsum.photos/id/64/200",
recruiterRating = "4.8",
topBarTitleResId = R.string.history_participant_detail_title,
actionButtonState = ActionButtonState.Visible(
textResId = R.string.history_delivery_done_button,
actionType = ParticipantDetailActionType.OPEN_DELIVERY_CONFIRM,
),
activeModal = ParticipantDetailModalUiModel.None,
isTrackingInfoVisible = true,
isParticipantStatusVisible = true,
)
}
Loading