카드 매입 승인 경로 Spring Boot 3 전환 (ACX-E2E-1785394564819)
Some checks failed
Verify / source-contract (push) Has been cancelled
Some checks failed
Verify / source-contract (push) Has been cancelled
This commit is contained in:
parent
ae293c9e47
commit
3f27f0740d
1 changed files with 32 additions and 0 deletions
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.acquirex.cardacquisition.dto;
|
||||||
|
|
||||||
|
import com.acquirex.cardacquisition.domain.AcquisitionApproval.ApprovalStatus;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
public sealed interface ApprovalDto permits ApprovalRequest, ApprovalResponse {}
|
||||||
|
|
||||||
|
public record ApprovalRequest(
|
||||||
|
@NotBlank(message = "카드번호는 필수입니다")
|
||||||
|
@Size(min = 16, max = 16, message = "카드번호는 16자리입니다")
|
||||||
|
String cardNumber,
|
||||||
|
|
||||||
|
@NotBlank(message = "가맹점ID는 필수입니다")
|
||||||
|
String merchantId,
|
||||||
|
|
||||||
|
@NotNull(message = "금액은 필수입니다")
|
||||||
|
@DecimalMin(value = "0.01", message = "최소 금액은 0.01입니다")
|
||||||
|
@DecimalMax(value = "999999999.99", message = "최대 금액을 초과했습니다")
|
||||||
|
BigDecimal amount
|
||||||
|
) implements ApprovalDto {}
|
||||||
|
|
||||||
|
public record ApprovalResponse(
|
||||||
|
Long id,
|
||||||
|
String cardNumber,
|
||||||
|
String merchantId,
|
||||||
|
BigDecimal amount,
|
||||||
|
ApprovalStatus status,
|
||||||
|
String approvalCode,
|
||||||
|
LocalDateTime createdAt
|
||||||
|
) implements ApprovalDto {}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue