refactor: PaymentEntityV2에 orderId 필드 추가 및 취소 상태 변경 메서드 추가

This commit is contained in:
이상진 2025-08-17 21:16:10 +09:00
parent 4108dcd01a
commit 349e0372f6

View File

@ -17,6 +17,7 @@ class PaymentEntityV2(
val reservationId: Long,
val paymentKey: String,
val orderId: String,
val totalAmount: Int,
val requestedAt: OffsetDateTime,
val approvedAt: OffsetDateTime,
@ -28,5 +29,10 @@ class PaymentEntityV2(
val method: PaymentMethod,
@Enumerated(EnumType.STRING)
val status: PaymentStatus
) : PersistableBaseEntity(id)
var status: PaymentStatus
) : PersistableBaseEntity(id) {
fun cancel() {
this.status = PaymentStatus.CANCELED
}
}