feat(gift): 선물 신청 요청 DTO를 추가한다
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package kr.co.vividnext.sodalive.v2.api.gift.dto
|
||||
|
||||
import kr.co.vividnext.sodalive.v2.gift.application.GiftApplicationCommand
|
||||
import kr.co.vividnext.sodalive.v2.gift.domain.GiftSize
|
||||
|
||||
data class GiftApplicationRequest(
|
||||
val recipientMemberId: Long,
|
||||
val senderName: String,
|
||||
val senderPhoneNumber: String,
|
||||
val senderZipCode: String,
|
||||
val senderAddress: String,
|
||||
val senderAddressDetail: String?,
|
||||
val sizeCode: GiftSize,
|
||||
val categoryId: Long,
|
||||
val senderTermsAgreed: Boolean,
|
||||
val senderPrivacyAgreed: Boolean,
|
||||
val damageWaiverAgreed: Boolean
|
||||
) {
|
||||
fun toCommand() = GiftApplicationCommand(
|
||||
recipientMemberId = recipientMemberId,
|
||||
senderName = senderName,
|
||||
senderPhoneNumber = senderPhoneNumber,
|
||||
senderZipCode = senderZipCode,
|
||||
senderAddress = senderAddress,
|
||||
senderAddressDetail = senderAddressDetail,
|
||||
sizeCode = sizeCode,
|
||||
categoryId = categoryId,
|
||||
senderTermsAgreed = senderTermsAgreed,
|
||||
senderPrivacyAgreed = senderPrivacyAgreed,
|
||||
damageWaiverAgreed = damageWaiverAgreed
|
||||
)
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package kr.co.vividnext.sodalive.v2.api.gift.dto
|
||||
|
||||
import kr.co.vividnext.sodalive.v2.gift.application.GiftRecipientAddressRegistrationCommand
|
||||
|
||||
data class GiftRecipientAddressRegistrationRequest(
|
||||
val recipientName: String,
|
||||
val recipientPhoneNumber: String,
|
||||
val recipientZipCode: String,
|
||||
val recipientAddress: String,
|
||||
val recipientAddressDetail: String?,
|
||||
val recipientTermsAgreed: Boolean,
|
||||
val recipientPrivacyAgreed: Boolean
|
||||
) {
|
||||
fun toCommand() = GiftRecipientAddressRegistrationCommand(
|
||||
name = recipientName,
|
||||
phoneNumber = recipientPhoneNumber,
|
||||
zipCode = recipientZipCode,
|
||||
address = recipientAddress,
|
||||
addressDetail = recipientAddressDetail,
|
||||
recipientTermsAgreed = recipientTermsAgreed,
|
||||
recipientPrivacyAgreed = recipientPrivacyAgreed
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.vividnext.sodalive.v2.api.gift.dto
|
||||
|
||||
import kr.co.vividnext.sodalive.v2.gift.application.GiftReviewCommand
|
||||
|
||||
data class GiftReviewRequest(
|
||||
val rating: Int,
|
||||
val keywords: List<String>,
|
||||
val comment: String?
|
||||
) {
|
||||
fun toCommand() = GiftReviewCommand(
|
||||
rating = rating,
|
||||
keywords = keywords,
|
||||
comment = comment
|
||||
)
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package kr.co.vividnext.sodalive.v2.api.gift.dto
|
||||
|
||||
import kr.co.vividnext.sodalive.v2.gift.application.GiftTrackingRegistrationCommand
|
||||
|
||||
data class GiftTrackingRegistrationRequest(
|
||||
val courierCompanyName: String,
|
||||
val trackingNumber: String
|
||||
) {
|
||||
fun toCommand() = GiftTrackingRegistrationCommand(
|
||||
courierCompanyName = courierCompanyName,
|
||||
trackingNumber = trackingNumber
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user