feat: 캔 등록/조회 - currency 추가

This commit is contained in:
2025-10-01 20:55:52 +09:00
parent 0c17ea2dcd
commit d7ad110b9e
4 changed files with 8 additions and 3 deletions

View File

@@ -8,7 +8,8 @@ import java.math.BigDecimal
data class AdminCanRequest(
val can: Int,
val rewardCan: Int,
val price: BigDecimal
val price: BigDecimal,
val currency: String
) {
fun toEntity(): Can {
var title = "${can.moneyFormat()}"
@@ -21,6 +22,7 @@ data class AdminCanRequest(
can = can,
rewardCan = rewardCan,
price = price,
currency = currency,
status = CanStatus.SALE
)
}

View File

@@ -12,6 +12,7 @@ data class Can(
var can: Int,
var rewardCan: Int,
var price: BigDecimal,
var currency: String,
@Enumerated(value = EnumType.STRING)
var status: CanStatus
) : BaseEntity()

View File

@@ -40,7 +40,8 @@ class CanQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : CanQue
can1.title,
can1.can,
can1.rewardCan,
can1.price
can1.price,
can1.currency
)
)
.from(can1)

View File

@@ -8,5 +8,6 @@ data class CanResponse @QueryProjection constructor(
val title: String,
val can: Int,
val rewardCan: Int,
val price: BigDecimal
val price: BigDecimal,
val currency: String
)