-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/main/java/shop/cazait/domain/auth/dto/sens/AuthSendMessageCodeInDTO.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package shop.cazait.domain.auth.dto.sens; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
|
||
@Schema(description = "문자 인증번호 발송 request : 문자 인증번호를 받을 정보 입력") | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Getter | ||
public class AuthSendMessageCodeInDTO { | ||
|
||
@Schema(description = "인증 번호가 발송될 전화번호", example = "01012345678") | ||
private String recipientPhoneNumber; | ||
|
||
@Builder | ||
AuthSendMessageCodeInDTO(String recipientPhoneNumber){ | ||
this.recipientPhoneNumber = recipientPhoneNumber; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/shop/cazait/domain/auth/dto/sens/AuthSendMessageCodeOutDTO.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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package shop.cazait.domain.auth.dto.sens; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.*; | ||
import shop.cazait.domain.review.dto.ReviewUpdateOutDTO; | ||
import shop.cazait.domain.review.entity.Review; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
import java.time.LocalDateTime; | ||
|
||
|
||
@Schema(description = "문자 인증번호 발송 response : 문자 인증번호 발송 결과 ") | ||
@Getter | ||
@Builder(access = AccessLevel.PRIVATE) | ||
public class AuthSendMessageCodeOutDTO { | ||
@Schema(description = "인증 번호가 발송된 전화번호", example = "01012345678") | ||
private String recipientPhoneNumber; | ||
|
||
@Schema(description = "요청 시간", example = "2023-07-06T16:55:25.972") | ||
@NotBlank | ||
private LocalDateTime requestTime; | ||
|
||
public static AuthSendMessageCodeOutDTO of(String recipientPhoneNumber, ExtSensSendMessageCodeOutDTO extSensSendMessageCodeOutDTO) { | ||
return AuthSendMessageCodeOutDTO.builder(). | ||
recipientPhoneNumber(recipientPhoneNumber). | ||
requestTime(extSensSendMessageCodeOutDTO.getRequestTime()) | ||
.build(); | ||
} | ||
} |