From efa265579634071c5451565bbc411d65d258d0ab Mon Sep 17 00:00:00 2001 From: minjun Date: Tue, 11 Jul 2023 22:17:51 +0900 Subject: [PATCH] =?UTF-8?q?[Add]=20#298=20-=20=EB=AC=B8=EC=9E=90=20?= =?UTF-8?q?=EC=A0=84=EC=86=A1=20DTO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/sens/AuthSendMessageCodeInDTO.java | 22 ++++++++++++++ .../dto/sens/AuthSendMessageCodeOutDTO.java | 29 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 src/main/java/shop/cazait/domain/auth/dto/sens/AuthSendMessageCodeInDTO.java create mode 100644 src/main/java/shop/cazait/domain/auth/dto/sens/AuthSendMessageCodeOutDTO.java diff --git a/src/main/java/shop/cazait/domain/auth/dto/sens/AuthSendMessageCodeInDTO.java b/src/main/java/shop/cazait/domain/auth/dto/sens/AuthSendMessageCodeInDTO.java new file mode 100644 index 00000000..6313485b --- /dev/null +++ b/src/main/java/shop/cazait/domain/auth/dto/sens/AuthSendMessageCodeInDTO.java @@ -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; + } +} \ No newline at end of file diff --git a/src/main/java/shop/cazait/domain/auth/dto/sens/AuthSendMessageCodeOutDTO.java b/src/main/java/shop/cazait/domain/auth/dto/sens/AuthSendMessageCodeOutDTO.java new file mode 100644 index 00000000..fc4e7ef1 --- /dev/null +++ b/src/main/java/shop/cazait/domain/auth/dto/sens/AuthSendMessageCodeOutDTO.java @@ -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(); + } +}