크리에이터 관리자 - 콘텐츠 수정
- 가격 수정시 변경사항 로그로 기록
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package kr.co.vividnext.sodalive.content
|
||||
|
||||
import java.time.LocalDateTime
|
||||
import javax.persistence.Entity
|
||||
import javax.persistence.FetchType
|
||||
import javax.persistence.GeneratedValue
|
||||
import javax.persistence.GenerationType
|
||||
import javax.persistence.Id
|
||||
import javax.persistence.JoinColumn
|
||||
import javax.persistence.ManyToOne
|
||||
import javax.persistence.PrePersist
|
||||
|
||||
@Entity
|
||||
data class ContentPriceChangeLog(
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long? = null,
|
||||
val prevPrice: Int,
|
||||
var createdAt: LocalDateTime? = null
|
||||
) {
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "content_id", nullable = false)
|
||||
var audioContent: AudioContent? = null
|
||||
|
||||
@PrePersist
|
||||
fun prePersist() {
|
||||
createdAt = LocalDateTime.now()
|
||||
}
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
package kr.co.vividnext.sodalive.content
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository
|
||||
|
||||
interface ContentPriceChangeLogRepository : JpaRepository<ContentPriceChangeLog, Long>
|
Reference in New Issue
Block a user