코인 충전, 코인 내역 API 추가
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package kr.co.vividnext.sodalive.can.payment
|
||||
|
||||
import kr.co.vividnext.sodalive.can.charge.Charge
|
||||
import kr.co.vividnext.sodalive.common.BaseEntity
|
||||
import javax.persistence.Column
|
||||
import javax.persistence.Entity
|
||||
import javax.persistence.EnumType
|
||||
import javax.persistence.Enumerated
|
||||
import javax.persistence.FetchType
|
||||
import javax.persistence.OneToOne
|
||||
|
||||
@Entity
|
||||
data class Payment(
|
||||
@Enumerated(value = EnumType.STRING)
|
||||
var status: PaymentStatus = PaymentStatus.REQUEST,
|
||||
|
||||
@Column(nullable = false)
|
||||
@Enumerated(value = EnumType.STRING)
|
||||
val paymentGateway: PaymentGateway
|
||||
) : BaseEntity() {
|
||||
@OneToOne(mappedBy = "payment", fetch = FetchType.LAZY)
|
||||
var charge: Charge? = null
|
||||
|
||||
@Column(columnDefinition = "TEXT", nullable = true)
|
||||
var receiptId: String? = null
|
||||
var method: String? = null
|
||||
|
||||
var price: Double = 0.toDouble()
|
||||
var locale: String? = null
|
||||
}
|
||||
|
||||
enum class PaymentStatus {
|
||||
// 결제요청
|
||||
REQUEST,
|
||||
|
||||
// 결제완료
|
||||
COMPLETE,
|
||||
|
||||
// 환불
|
||||
RETURN
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package kr.co.vividnext.sodalive.can.payment
|
||||
|
||||
enum class PaymentGateway {
|
||||
PG, GOOGLE_IAP, APPLE_IAP
|
||||
}
|
||||
Reference in New Issue
Block a user