feat(gift): 선물 응답 모델을 추가한다
This commit is contained in:
@@ -0,0 +1,135 @@
|
||||
import Foundation
|
||||
|
||||
struct GiftFormOptionsResponse: Decodable {
|
||||
let sizes: [GiftSizeOptionResponse]
|
||||
let categories: [GiftCategoryOptionResponse]
|
||||
}
|
||||
|
||||
struct GiftSizeOptionResponse: Decodable {
|
||||
let sizeCode: String
|
||||
let name: String
|
||||
let basePriceCan: Int
|
||||
let salePriceCan: Int
|
||||
}
|
||||
|
||||
struct GiftCategoryOptionResponse: Decodable {
|
||||
let categoryId: Int
|
||||
let name: String
|
||||
let requiresDamageWaiver: Bool
|
||||
}
|
||||
|
||||
struct CreateGiftRequest: Encodable {
|
||||
let recipientMemberId: Int
|
||||
let senderName: String
|
||||
let senderPhoneNumber: String
|
||||
let senderZipCode: String
|
||||
let senderAddress: String
|
||||
let senderAddressDetail: String
|
||||
let sizeCode: String
|
||||
let categoryId: Int
|
||||
let senderTermsAgreed: Bool
|
||||
let senderPrivacyAgreed: Bool
|
||||
let damageWaiverAgreed: Bool
|
||||
}
|
||||
|
||||
struct CreateGiftResponse: Decodable {
|
||||
let applicationNo: String
|
||||
let status: String
|
||||
let statusName: String
|
||||
let priceCan: Int
|
||||
let trackingDeadlineAt: String
|
||||
}
|
||||
|
||||
struct GiftListResponse: Decodable {
|
||||
let totalCount: Int
|
||||
let items: [GiftListItemResponse]
|
||||
let page: Int
|
||||
let size: Int
|
||||
let hasNext: Bool
|
||||
}
|
||||
|
||||
struct GiftListItemResponse: Decodable {
|
||||
let applicationNo: String
|
||||
let direction: String
|
||||
let status: String
|
||||
let statusName: String
|
||||
let priceCan: Int
|
||||
let categoryName: String
|
||||
let sizeName: String
|
||||
let counterpartMemberId: Int
|
||||
let counterpartNickname: String
|
||||
let counterpartProfileImageUrl: String?
|
||||
let createdAt: String
|
||||
}
|
||||
|
||||
struct GiftDetailResponse: Decodable {
|
||||
let applicationNo: String
|
||||
let direction: String
|
||||
let status: String
|
||||
let statusName: String
|
||||
let giftInfo: GiftInfoResponse
|
||||
let senderInfo: GiftSenderInfoResponse?
|
||||
let recipientAddress: GiftRecipientAddressResponse?
|
||||
let mailbox: GiftMailboxResponse?
|
||||
let trackingRequired: Bool
|
||||
let recipientAddressRequired: Bool
|
||||
let recipientAddressDeadlineAt: String?
|
||||
let delivery: GiftDeliveryResponse
|
||||
let statusTimeline: [GiftStatusTimelineResponse]
|
||||
}
|
||||
|
||||
struct GiftInfoResponse: Decodable {
|
||||
let recipientCreatorNickname: String?
|
||||
let senderNickname: String?
|
||||
let sizeName: String
|
||||
let categoryName: String
|
||||
let applicationNo: String?
|
||||
let paidCan: Int?
|
||||
let tracking: String?
|
||||
let shippingRequestedAt: String?
|
||||
}
|
||||
|
||||
struct GiftSenderInfoResponse: Decodable {
|
||||
let name: String
|
||||
let phoneNumber: String
|
||||
let address: String
|
||||
}
|
||||
|
||||
struct GiftRecipientAddressResponse: Decodable {
|
||||
let name: String
|
||||
let phoneNumber: String
|
||||
let address: String
|
||||
}
|
||||
|
||||
struct GiftMailboxResponse: Decodable {
|
||||
let name: String
|
||||
let address: String
|
||||
let phoneNumber: String
|
||||
}
|
||||
|
||||
struct GiftDeliveryResponse: Decodable {
|
||||
let canceledAt: String?
|
||||
let undeliverableAt: String?
|
||||
let undeliverableReason: String?
|
||||
}
|
||||
|
||||
struct GiftStatusTimelineResponse: Decodable {
|
||||
let status: String
|
||||
let statusName: String
|
||||
let occurredAt: String?
|
||||
}
|
||||
|
||||
struct RegisterGiftTrackingRequest: Encodable {
|
||||
let courierCompanyName: String
|
||||
let trackingNumber: String
|
||||
}
|
||||
|
||||
struct SubmitGiftRecipientAddressRequest: Encodable {
|
||||
let recipientName: String
|
||||
let recipientPhoneNumber: String
|
||||
let recipientZipCode: String
|
||||
let recipientAddress: String
|
||||
let recipientAddressDetail: String
|
||||
let recipientTermsAgreed: Bool
|
||||
let recipientPrivacyAgreed: Bool
|
||||
}
|
||||
Reference in New Issue
Block a user