22 lines
687 B
Kotlin
22 lines
687 B
Kotlin
package nl.voidcorp.discord.storage
|
|
|
|
import org.hibernate.annotations.LazyCollection
|
|
import org.hibernate.annotations.LazyCollectionOption
|
|
import java.time.LocalDateTime
|
|
import javax.persistence.ElementCollection
|
|
import javax.persistence.Entity
|
|
import javax.persistence.GeneratedValue
|
|
import javax.persistence.Id
|
|
|
|
@Entity
|
|
data class MessageStore(
|
|
val msgId: Long, var text: String,
|
|
val guildId: Long, val authorId: Long,
|
|
@ElementCollection @LazyCollection(LazyCollectionOption.FALSE) val past: MutableList<String> = mutableListOf(),
|
|
val now: LocalDateTime = LocalDateTime.now(),
|
|
var deleted: Boolean = false,
|
|
@Id
|
|
@GeneratedValue
|
|
var id: Long? = null
|
|
) {
|
|
} |