This commit is contained in:
2026-04-02 14:05:14 +09:00
parent 62feed6078
commit ef1847f115
8 changed files with 215 additions and 96 deletions
+34 -4
View File
@@ -47,15 +47,34 @@ object ConfigTable : Table("app_config") {
val min_purchase_score = double("min_purchase_score").default( 65.0)
val sell_profit = double("sell_profit").default( 1.0)
val grade_5_buy = integer("grade_5_buy").default(0)
val grade_5_profit = double("grade_5_profit").default(1.8)
val grade_4_buy = integer("grade_4_buy").default(1)
val grade_4_profit = double("grade_4_profit").default(1.3)
val grade_3_buy = integer("grade_3_buy").default(1)
val grade_3_profit = double("grade_3_profit").default(0.9)
val grade_2_buy = integer("grade_2_buy").default(2)
val grade_2_profit = double("grade_2_profit").default(0.7)
val grade_1_buy = integer("grade_1_buy").default(3)
val grade_5_profit = double("grade_5_profit").default(1.8)
val grade_4_profit = double("grade_4_profit").default(1.3)
val grade_3_profit = double("grade_3_profit").default(0.9)
val grade_2_profit = double("grade_2_profit").default(0.7)
val grade_1_profit = double("grade_1_profit").default(0.5)
val grade_5_allocationrate = double("grade_5_allocationrate").default(1.0)
val grade_4_allocationrate = double("grade_4_allocationrate").default(0.8)
val grade_3_allocationrate = double("grade_3_allocationrate").default(0.6)
val grade_2_allocationrate = double("grade_2_allocationrate").default(0.4)
val grade_1_allocationrate = double("grade_1_allocationrate").default(0.3)
val max_count = integer("max_count").default(20)
override val primaryKey = PrimaryKey(id)
}
@@ -260,6 +279,11 @@ object DatabaseFactory {
GRADE_2_PROFIT = it[ConfigTable.grade_2_profit],
GRADE_1_BUY = it[ConfigTable.grade_1_buy],
GRADE_1_PROFIT = it[ConfigTable.grade_1_profit],
GRADE_1_ALLOCATIONRATE = it[ConfigTable.grade_1_allocationrate],
GRADE_2_ALLOCATIONRATE = it[ConfigTable.grade_2_allocationrate],
GRADE_3_ALLOCATIONRATE = it[ConfigTable.grade_3_allocationrate],
GRADE_4_ALLOCATIONRATE = it[ConfigTable.grade_4_allocationrate],
GRADE_5_ALLOCATIONRATE = it[ConfigTable.grade_5_allocationrate],
MAX_COUNT = it[ConfigTable.max_count],
)
}
@@ -300,6 +324,12 @@ object DatabaseFactory {
it[grade_2_profit] = config.GRADE_2_PROFIT
it[grade_1_buy] = config.GRADE_1_BUY
it[grade_1_profit] = config.GRADE_1_PROFIT
it[grade_5_allocationrate] = config.GRADE_5_ALLOCATIONRATE
it[grade_4_allocationrate] = config.GRADE_4_ALLOCATIONRATE
it[grade_3_allocationrate] = config.GRADE_3_ALLOCATIONRATE
it[grade_2_allocationrate] = config.GRADE_2_ALLOCATIONRATE
it[grade_1_allocationrate] = config.GRADE_1_ALLOCATIONRATE
it[max_count] = config.MAX_COUNT
}
}