diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/api/gift/dto/GiftApplicationRequest.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/api/gift/dto/GiftApplicationRequest.kt new file mode 100644 index 00000000..fbccf62e --- /dev/null +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/api/gift/dto/GiftApplicationRequest.kt @@ -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 + ) +} diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/api/gift/dto/GiftRecipientAddressRegistrationRequest.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/api/gift/dto/GiftRecipientAddressRegistrationRequest.kt new file mode 100644 index 00000000..8617032e --- /dev/null +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/api/gift/dto/GiftRecipientAddressRegistrationRequest.kt @@ -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 + ) +} diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/api/gift/dto/GiftReviewRequest.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/api/gift/dto/GiftReviewRequest.kt new file mode 100644 index 00000000..9825e279 --- /dev/null +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/api/gift/dto/GiftReviewRequest.kt @@ -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, + val comment: String? +) { + fun toCommand() = GiftReviewCommand( + rating = rating, + keywords = keywords, + comment = comment + ) +} diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/api/gift/dto/GiftTrackingRegistrationRequest.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/api/gift/dto/GiftTrackingRegistrationRequest.kt new file mode 100644 index 00000000..59db2ecd --- /dev/null +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/api/gift/dto/GiftTrackingRegistrationRequest.kt @@ -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 + ) +}