-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
src/main/java/com/rootandfruit/server/dto/OrderRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
package com.rootandfruit.server.dto; | ||
|
||
import jakarta.persistence.Column; | ||
import java.time.LocalDate; | ||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotEmpty; | ||
import java.util.List; | ||
|
||
public record OrderRequestDto( | ||
@NotBlank(message = "발신자명은 필수입니다.") | ||
String senderName, | ||
@NotBlank(message = "발신자 전화번호는 필수입니다.") | ||
String senderPhone, | ||
boolean isMarketingConsent, | ||
List<RecipientDto> recipientInfo | ||
@NotEmpty(message = "수신자 정보는 빈 값일 수 없습니다.") | ||
@Valid List<RecipientDto> recipientInfo | ||
) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 13 additions & 2 deletions
15
src/main/java/com/rootandfruit/server/dto/RecipientDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
package com.rootandfruit.server.dto; | ||
|
||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotEmpty; | ||
import jakarta.validation.constraints.NotNull; | ||
import java.time.LocalDate; | ||
import java.util.List; | ||
|
||
public record RecipientDto( | ||
@NotBlank(message = "수신자명은 필수입니다.") | ||
String recipientName, | ||
@NotBlank(message = "수신자 전화번호는 필수입니다.") | ||
String recipientPhone, | ||
@NotBlank(message = "수신자 주소는 필수입니다.") | ||
String recipientAddress, | ||
@NotBlank(message = "수신자 상세주소는 필수입니다.") | ||
String recipientAddressDetail, | ||
@NotBlank(message = "수신자 우편번호는 필수입니다.") | ||
String recipientPostCode, | ||
List<ProductDto> productInfo, | ||
@NotEmpty(message = "상품정보는 빈 값일 수 없습니다.") | ||
@Valid List<ProductDto> productInfo, | ||
@NotNull(message = "배송날짜는 null값일 수 없습니다.") | ||
LocalDate deliveryDate | ||
) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters