feat: add command execute record in db

This commit is contained in:
2024-10-02 21:02:05 +08:00
parent 767bd7c0f3
commit 57885473bd
31 files changed
+169 -61

No files matched your search

@@ -0,0 +1,19 @@
/*
* Copyright © 2024 RTAkland
* Author: RTAkland
* Date: 2024/10/2
*/
package cn.rtast.fancybot.db
import org.jetbrains.exposed.sql.Table
object ActionTable: Table("action") {
val id = integer("id").autoIncrement().nullable()
val action = varchar("action", 255).nullable()
val timestamp = long("timestamp").nullable()
val triggerId = long("trigger_id").nullable()
val result = varchar("result", 255)
override val primaryKey = PrimaryKey(id)
}
@@ -0,0 +1,25 @@
/*
* Copyright © 2024 RTAkland
* Author: RTAkland
* Date: 2024/8/30
*/
package cn.rtast.fancybot.db
import org.jetbrains.exposed.sql.Table
object JrrpTable : Table("jrrp") {
val id = integer("id").autoIncrement()
val userId = long("userId").uniqueIndex()
val timestamp = long("timestamp")
val point = long("point")
override val primaryKey = PrimaryKey(id)
}
data class JrrpRecord(
val id: Long,
val timestamp: Long,
var points: Long,
)
@@ -0,0 +1,28 @@
/*
* Copyright © 2024 RTAkland
* Author: RTAkland
* Date: 2024/9/24
*/
package cn.rtast.fancybot.db
import org.jetbrains.exposed.sql.Table
object NiuziBankTable : Table("niuzi_bank") {
val id = long("id").autoIncrement()
val userId = long("userId").uniqueIndex()
val timestamp = long("timestamp")
val balance = double("balance")
val interestRate = double("interest_rate")
val nickname = varchar("nickname", 255)
override val primaryKey = PrimaryKey(id)
}
data class NiuziBankAccount(
val userId: Long,
val balance: Double,
val interestRate: Double,
val timestamp: Long,
val nickname: String
)
@@ -0,0 +1,26 @@
/*
* Copyright © 2024 RTAkland
* Author: RTAkland
* Date: 2024/9/8
*/
package cn.rtast.fancybot.db
import org.jetbrains.exposed.sql.Table
object NiuziTable : Table("niuzi") {
val length = double("length")
val id = long("id").autoIncrement()
val userId = long("userId").uniqueIndex()
val timestamp = long("timestamp")
val nickname = varchar("nickname", 255)
override val primaryKey = PrimaryKey(id)
}
data class Niuzi(
val userId: Long,
val length: Double,
val timestamp: Long,
val nickname: String,
)