add chzzk chat handler, command handler

This commit is contained in:
dalbodeule committed 2024-06-12 22:19:19 +09:00
1 parent 294bf04a50
commit 4b7fe25b21
14 files changed
+299 -16

No files matched your search

@@ -0,0 +1,21 @@
package space.mori.chzzk_bot.models
import org.jetbrains.exposed.dao.IntEntity
import org.jetbrains.exposed.dao.IntEntityClass
import org.jetbrains.exposed.dao.id.EntityID
import org.jetbrains.exposed.dao.id.IntIdTable
import org.jetbrains.exposed.sql.ReferenceOption
object Commands: IntIdTable("commands") {
val user = reference("user", Users, onDelete = ReferenceOption.CASCADE)
val command = varchar("command", 255)
val content = text("content")
}
class Command(id: EntityID<Int>) : IntEntity(id) {
companion object : IntEntityClass<Command>(Commands)
var user by User referencedOn Commands.user
var command by Commands.command
var content by Commands.content
}