Files
sodalive-backend-spring-boot/src/main/kotlin/kr/co/vividnext/sodalive/content/PlaybackTracking.kt
2023-08-03 20:36:37 +09:00

27 lines
618 B
Kotlin

package kr.co.vividnext.sodalive.content
import java.time.LocalDateTime
import javax.persistence.Entity
import javax.persistence.GeneratedValue
import javax.persistence.GenerationType
import javax.persistence.Id
import javax.persistence.PrePersist
@Entity
data class PlaybackTracking(
val memberId: Long,
val contentId: Long,
val isPreview: Boolean,
val playDate: LocalDateTime
) {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
var id: Long? = null
var createdAt: LocalDateTime? = null
@PrePersist
fun prePersist() {
createdAt = LocalDateTime.now()
}
}