All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.dehuckakpyt.telegrambot.model.message.JpaTelegramMessage.kt Maven / Gradle / Ivy

There is a newer version: 0.11.4
Show newest version
package io.github.dehuckakpyt.telegrambot.model.message

import io.github.dehuckakpyt.telegrambot.model.UUIDTable
import io.github.dehuckakpyt.telegrambot.model.source.TelegramMessage
import io.hypersistence.utils.hibernate.type.array.ListArrayType
import org.hibernate.annotations.ColumnDefault
import org.hibernate.annotations.Type
import org.hibernate.annotations.TypeDef
import java.time.LocalDateTime
import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.Table


/**
 * Created on 20.07.2023.
 *

* * @author Denis Matytsin */ @Entity @Table(name = "telegram_message") @TypeDef(name = "list-array", typeClass = ListArrayType::class) class JpaTelegramMessage( @Column(nullable = false) override val chatId: Long, @Column(nullable = false) override val fromId: Long, @Column(nullable = false) override val fromBot: Boolean, @Column(nullable = false) override val messageId: Long, @Column(nullable = false) override val type: String, override val step: String?, override val stepContainerType: String?, @Column(columnDefinition = "text") override val text: String?, @Type(type = "list-array") @Column(name = "file_ids", columnDefinition = "text[]") override val fileIds: List?, @Column(nullable = false) @ColumnDefault("'now()'") override val createDate: LocalDateTime = LocalDateTime.now(), ) : UUIDTable(), TelegramMessage





© 2015 - 2025 Weber Informatics LLC | Privacy Policy