generated from pricelees/issue-pr-template
[#35] 결제 스키마 재정의 & 예약 조회 페이지 개선 #36
@ -0,0 +1,5 @@
|
|||||||
|
package roomescape.payment.infrastructure.persistence.v2
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository
|
||||||
|
|
||||||
|
interface CanceledPaymentRepositoryV2 : JpaRepository<CanceledPaymentV2, Long>
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package roomescape.payment.infrastructure.persistence.v2
|
||||||
|
|
||||||
|
import jakarta.persistence.Entity
|
||||||
|
import jakarta.persistence.Table
|
||||||
|
import roomescape.common.entity.PersistableBaseEntity
|
||||||
|
import java.time.OffsetDateTime
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "canceled_payment1")
|
||||||
|
class CanceledPaymentV2(
|
||||||
|
id: Long,
|
||||||
|
|
||||||
|
val paymentId: Long,
|
||||||
|
val canceledAt: OffsetDateTime,
|
||||||
|
val canceledBy: Long,
|
||||||
|
val cancelReason: String?,
|
||||||
|
) : PersistableBaseEntity(id)
|
||||||
|
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package roomescape.payment.infrastructure.persistence.v2
|
||||||
|
|
||||||
|
import jakarta.persistence.Entity
|
||||||
|
import jakarta.persistence.EnumType
|
||||||
|
import jakarta.persistence.Enumerated
|
||||||
|
import jakarta.persistence.Table
|
||||||
|
import roomescape.common.entity.PersistableBaseEntity
|
||||||
|
import roomescape.payment.infrastructure.common.PaymentMethod
|
||||||
|
import roomescape.payment.infrastructure.common.PaymentStatus
|
||||||
|
import roomescape.payment.infrastructure.common.PaymentType
|
||||||
|
import java.time.OffsetDateTime
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "payment1")
|
||||||
|
class PaymentEntityV2(
|
||||||
|
id: Long,
|
||||||
|
|
||||||
|
val reservationId: Long,
|
||||||
|
val paymentKey: String,
|
||||||
|
val totalAmount: Int,
|
||||||
|
val requestedAt: OffsetDateTime,
|
||||||
|
val approvedAt: OffsetDateTime,
|
||||||
|
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
|
val type: PaymentType,
|
||||||
|
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
|
val method: PaymentMethod,
|
||||||
|
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
|
val status: PaymentStatus
|
||||||
|
) : PersistableBaseEntity(id)
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
package roomescape.payment.infrastructure.persistence.v2
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository
|
||||||
|
|
||||||
|
interface PaymentRepositoryV2: JpaRepository<PaymentEntityV2, Long>
|
||||||
Loading…
x
Reference in New Issue
Block a user