This commit is contained in:
2026-02-19 15:47:31 +09:00
parent df124612ab
commit c4f58f159a
11 changed files with 609 additions and 113 deletions
+57 -3
View File
@@ -30,6 +30,24 @@ object ConfigTable : Table("app_config") {
val modelPath = varchar("model_path", 512).default("")
val embedModelPath = varchar("embed_model_path", 512).default("")
val htsId = varchar("hts_id", 50).default("") // HTS ID 컬럼 추가
val fees_and_taxrate = double("fees_and_taxrate").default( 0.33)
val minimum_net_profit = double("minimum_net_profit").default( 0.8)
val buy_weight = double("buy_weight").default( 2.0)
val max_budget = double("max_budget").default( 80000.0)
val max_price = double("max_price").default( 40000.0)
val min_price = double("min_price").default( 800.0)
val min_purchase_score = double("min_purchase_score").default( 65.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_1_profit = double("grade_1_profit").default(0.5)
val max_count = integer("max_count").default(20)
override val primaryKey = PrimaryKey(id)
}
@@ -159,7 +177,7 @@ object DatabaseFactory {
stopLossPrice = it[AutoTradeTable.stopLossPrice],
orderNo = it[AutoTradeTable.orderNo],
status = it[AutoTradeTable.status],
isDomestic = it[AutoTradeTable.isDomestic]
isDomestic = it[AutoTradeTable.isDomestic],
)
// --- 기존 설정 및 로그 관련 함수 ---
@@ -189,10 +207,28 @@ object DatabaseFactory {
vtsAppKey = it[ConfigTable.vtsAppKey],
vtsSecretKey = it[ConfigTable.vtsSecretKey],
vtsAccountNo = it[ConfigTable.vtsAccountNo],
isSimulation = it[ConfigTable.isSimulation],
htsId = it[ConfigTable.htsId], // htsId 로드
htsId = it[ConfigTable.htsId],
isSimulation = it[ConfigTable.isSimulation], // htsId 로드
modelPath = it[ConfigTable.modelPath],
embedModelPath = it[ConfigTable.embedModelPath],
FEES_AND_TAXRATE = it[ConfigTable.fees_and_taxrate],
MINIMUM_NET_PROFIT = it[ConfigTable.minimum_net_profit],
BUY_WEIGHT = it[ConfigTable.buy_weight],
MAX_BUDGET = it[ConfigTable.max_budget],
MAX_PRICE = it[ConfigTable.max_price],
MIN_PRICE = it[ConfigTable.min_price],
MIN_PURCHASE_SCORE = it[ConfigTable.min_purchase_score],
GRADE_5_BUY = it[ConfigTable.grade_5_buy],
GRADE_5_PROFIT = it[ConfigTable.grade_5_profit],
GRADE_4_BUY = it[ConfigTable.grade_4_buy],
GRADE_4_PROFIT = it[ConfigTable.grade_4_profit],
GRADE_3_BUY = it[ConfigTable.grade_3_buy],
GRADE_3_PROFIT = it[ConfigTable.grade_3_profit],
GRADE_2_BUY = it[ConfigTable.grade_2_buy],
GRADE_2_PROFIT = it[ConfigTable.grade_2_profit],
GRADE_1_BUY = it[ConfigTable.grade_1_buy],
GRADE_1_PROFIT = it[ConfigTable.grade_1_profit],
MAX_COUNT = it[ConfigTable.max_count],
)
}
}
@@ -211,6 +247,24 @@ object DatabaseFactory {
it[htsId] = config.htsId
it[modelPath] = config.modelPath
it[embedModelPath] = config.embedModelPath
it[fees_and_taxrate] = config.FEES_AND_TAXRATE
it[minimum_net_profit] = config.MINIMUM_NET_PROFIT
it[buy_weight] = config.BUY_WEIGHT
it[max_budget] = config.MAX_BUDGET
it[max_price] = config.MAX_PRICE
it[min_price] = config.MIN_PRICE
it[min_purchase_score] = config.MIN_PURCHASE_SCORE
it[grade_5_buy] = config.GRADE_5_BUY
it[grade_5_profit] = config.GRADE_5_PROFIT
it[grade_4_buy] = config.GRADE_4_BUY
it[grade_4_profit] = config.GRADE_4_PROFIT
it[grade_3_buy] = config.GRADE_3_BUY
it[grade_3_profit] = config.GRADE_3_PROFIT
it[grade_2_buy] = config.GRADE_2_BUY
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[ConfigTable.max_count] =config.MAX_COUNT
}
}
}