카드 매입 승인 경로 Spring Boot 3 전환 (ACX-E2E-1785394564819)
This commit is contained in:
parent
c9483167fc
commit
1696f372a4
1 changed files with 72 additions and 0 deletions
72
src/main/java/com/acquirex/domain/AcquisitionApproval.java
Normal file
72
src/main/java/com/acquirex/domain/AcquisitionApproval.java
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
package com.acquirex.domain;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "acquisition_approvals")
|
||||||
|
public class AcquisitionApproval {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Column(name = "merchant_id", nullable = false)
|
||||||
|
private String merchantId;
|
||||||
|
|
||||||
|
@Column(name = "card_number", nullable = false)
|
||||||
|
private String cardNumber;
|
||||||
|
|
||||||
|
@Column(name = "amount", nullable = false, precision = 15, scale = 2)
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
@Column(name = "currency", nullable = false, length = 3)
|
||||||
|
private String currency;
|
||||||
|
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
|
@Column(name = "status", nullable = false)
|
||||||
|
private ApprovalStatus status;
|
||||||
|
|
||||||
|
@Column(name = "approval_code")
|
||||||
|
private String approvalCode;
|
||||||
|
|
||||||
|
@Column(name = "rejection_reason")
|
||||||
|
private String rejectionReason;
|
||||||
|
|
||||||
|
@Column(name = "requested_at", nullable = false)
|
||||||
|
private LocalDateTime requestedAt;
|
||||||
|
|
||||||
|
@Column(name = "processed_at")
|
||||||
|
private LocalDateTime processedAt;
|
||||||
|
|
||||||
|
public enum ApprovalStatus {
|
||||||
|
PENDING, APPROVED, REJECTED, CANCELLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public AcquisitionApproval() {
|
||||||
|
this.requestedAt = LocalDateTime.now();
|
||||||
|
this.status = ApprovalStatus.PENDING;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId() { return id; }
|
||||||
|
public void setId(Long id) { this.id = id; }
|
||||||
|
public String getMerchantId() { return merchantId; }
|
||||||
|
public void setMerchantId(String merchantId) { this.merchantId = merchantId; }
|
||||||
|
public String getCardNumber() { return cardNumber; }
|
||||||
|
public void setCardNumber(String cardNumber) { this.cardNumber = cardNumber; }
|
||||||
|
public BigDecimal getAmount() { return amount; }
|
||||||
|
public void setAmount(BigDecimal amount) { this.amount = amount; }
|
||||||
|
public String getCurrency() { return currency; }
|
||||||
|
public void setCurrency(String currency) { this.currency = currency; }
|
||||||
|
public ApprovalStatus getStatus() { return status; }
|
||||||
|
public void setStatus(ApprovalStatus status) { this.status = status; }
|
||||||
|
public String getApprovalCode() { return approvalCode; }
|
||||||
|
public void setApprovalCode(String approvalCode) { this.approvalCode = approvalCode; }
|
||||||
|
public String getRejectionReason() { return rejectionReason; }
|
||||||
|
public void setRejectionReason(String rejectionReason) { this.rejectionReason = rejectionReason; }
|
||||||
|
public LocalDateTime getRequestedAt() { return requestedAt; }
|
||||||
|
public void setRequestedAt(LocalDateTime requestedAt) { this.requestedAt = requestedAt; }
|
||||||
|
public LocalDateTime getProcessedAt() { return processedAt; }
|
||||||
|
public void setProcessedAt(LocalDateTime processedAt) { this.processedAt = processedAt; }
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue