Skip to content

Commit

Permalink
[Add] #298 - 문자 전송 DTO
Browse files Browse the repository at this point in the history
  • Loading branch information
mjKim1229 committed Jul 11, 2023
1 parent 7c7789e commit efa2655
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
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;
}
}
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();
}
}

0 comments on commit efa2655

Please sign in to comment.