This commit is contained in:
Mrx
2026-01-30 11:39:28 +08:00
parent c64b22ab05
commit 76784c3c1b
19 changed files with 717 additions and 46 deletions

View File

@@ -1,7 +1,7 @@
# 设置输出编码为UTF-8
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
# 数据库连接信息 - 修改了URL格式
$DB_URL = "tyc:5vg67b3UNHu8@(127.0.0.1:21001)/tyc"
$DB_URL = "tyc:5vg67b3UNHu8@tcp(127.0.0.1:22001)/tyc"
$OUTPUT_DIR = "./model"
$TEMPLATE_DIR = "../template"
@@ -11,7 +11,7 @@ $tables = @(
# "agent_active_stat",
# "agent_audit",
# "agent_closure",
"agent_commission"
# "agent_commission"
# "agent_wallet_transaction"
# "agent_commission_deduction"
# "agent_link",
@@ -54,10 +54,11 @@ $tables = @(
# "admin_promotion_link_stats_total"
# "admin_promotion_link_stats_history"
# "admin_promotion_order"
"query_user_record"
)
# 为每个表生成模型
foreach ($table in $tables) {
goctl model mysql datasource -url="tyc:5vg67b3UNHu8@tcp(127.0.0.1:21001)/tyc" -table="$table" -dir="./model" --home="../template" -cache=true --style=goZero
goctl model mysql datasource -url="tyc:5vg67b3UNHu8@tcp(127.0.0.1:22001)/tyc" -table="$table" -dir="./model" --home="../template" -cache=true --style=goZero
}