Compare commits

...

2 Commits

Author SHA1 Message Date
Klaus c46d6621ec 콘텐츠 상세
- 구매옵션(모두, 소장만, 대여만) 추가
2024-11-08 00:48:30 +09:00
Klaus d94ef1eb25 콘텐츠 등록
- 구매옵션(모두, 소장만, 대여만) 추가
2024-11-08 00:47:12 +09:00
4 changed files with 12 additions and 0 deletions

View File

@ -9,6 +9,8 @@ import java.time.LocalDateTime
import javax.persistence.CascadeType import javax.persistence.CascadeType
import javax.persistence.Column import javax.persistence.Column
import javax.persistence.Entity import javax.persistence.Entity
import javax.persistence.EnumType
import javax.persistence.Enumerated
import javax.persistence.FetchType import javax.persistence.FetchType
import javax.persistence.JoinColumn import javax.persistence.JoinColumn
import javax.persistence.ManyToOne import javax.persistence.ManyToOne
@ -16,6 +18,10 @@ import javax.persistence.OneToMany
import javax.persistence.OneToOne import javax.persistence.OneToOne
import javax.persistence.Table import javax.persistence.Table
enum class PurchaseOption {
BOTH, BUY_ONLY, RENT_ONLY
}
enum class SortType { enum class SortType {
NEWEST, PRICE_HIGH, PRICE_LOW NEWEST, PRICE_HIGH, PRICE_LOW
} }
@ -30,6 +36,8 @@ data class AudioContent(
var releaseDate: LocalDateTime? = null, var releaseDate: LocalDateTime? = null,
val limited: Int? = null, val limited: Int? = null,
var remaining: Int? = null, var remaining: Int? = null,
@Enumerated(value = EnumType.STRING)
val purchaseOption: PurchaseOption = PurchaseOption.BOTH,
val isGeneratePreview: Boolean = true, val isGeneratePreview: Boolean = true,
var isOnlyRental: Boolean = false, var isOnlyRental: Boolean = false,
var isAdult: Boolean = false, var isAdult: Boolean = false,

View File

@ -183,6 +183,7 @@ class AudioContentService(
limited = request.limited, limited = request.limited,
remaining = request.limited, remaining = request.limited,
isAdult = request.isAdult, isAdult = request.isAdult,
purchaseOption = request.purchaseOption,
isGeneratePreview = request.isGeneratePreview, isGeneratePreview = request.isGeneratePreview,
isOnlyRental = if (request.limited != null && request.limited > 0) false else request.isOnlyRental, isOnlyRental = if (request.limited != null && request.limited > 0) false else request.isOnlyRental,
isCommentAvailable = request.isCommentAvailable isCommentAvailable = request.isCommentAvailable
@ -587,6 +588,7 @@ class AudioContentService(
isMosaic = audioContent.isAdult && member.auth == null, isMosaic = audioContent.isAdult && member.auth == null,
isOnlyRental = audioContent.isOnlyRental, isOnlyRental = audioContent.isOnlyRental,
existOrdered = isExistsAudioContent, existOrdered = isExistsAudioContent,
purchaseOption = audioContent.purchaseOption,
orderType = orderType, orderType = orderType,
remainingTime = remainingTime, remainingTime = remainingTime,
creatorOtherContentList = creatorOtherContentList, creatorOtherContentList = creatorOtherContentList,

View File

@ -5,6 +5,7 @@ data class CreateAudioContentRequest(
val detail: String, val detail: String,
val tags: String, val tags: String,
val price: Int, val price: Int,
val purchaseOption: PurchaseOption = PurchaseOption.BOTH,
val limited: Int? = null, val limited: Int? = null,
val timezone: String = "Asia/Seoul", val timezone: String = "Asia/Seoul",
val releaseDate: String? = null, val releaseDate: String? = null,

View File

@ -23,6 +23,7 @@ data class GetAudioContentDetailResponse(
val isMosaic: Boolean, val isMosaic: Boolean,
val isOnlyRental: Boolean, val isOnlyRental: Boolean,
val existOrdered: Boolean, val existOrdered: Boolean,
val purchaseOption: PurchaseOption,
val orderType: OrderType?, val orderType: OrderType?,
val remainingTime: String?, val remainingTime: String?,
val creatorOtherContentList: List<OtherContentResponse>, val creatorOtherContentList: List<OtherContentResponse>,