This commit is contained in:
2026-03-02 12:46:26 +08:00
parent 9fe6a88670
commit 6db59f1dea
61 changed files with 5432 additions and 1706 deletions

View File

@@ -10,6 +10,14 @@ $HOME_DIR = Join-Path $PSScriptRoot "..\template"
# 表名列表
$tables = @(
# ============================================
# 统计/白名单/成本价 同步用(执行 sync_whitelist_cost_tables.sql 后再生成)
# ============================================
"feature",
"tianyuanapi_call_log",
"user_feature_whitelist",
"whitelist_order",
"whitelist_order_item"
# ============================================
# 新代理系统表
# ============================================
@@ -28,7 +36,7 @@ $tables = @(
# "admin_user_role",
# "agent",
# "agent_commission",
"agent_config"
# "agent_config"
# "agent_freeze_task",
# "agent_invite_code",
# "agent_invite_code_usage",
@@ -62,7 +70,7 @@ $tables = @(
# 为每个表生成模型
foreach ($table in $tables) {
Write-Host "正在生成表: $table" -ForegroundColor Green
goctl model mysql datasource -url="qnc:5vg67b3UNHu8@tcp(127.0.0.1:21001)/qnc" -table="$table" -dir="./model" --home="$HOME_DIR" -cache=true --style=goZero
goctl model mysql datasource -url="qnc:5vg67b3UNHu8@tcp(127.0.0.1:21201)/qnc" -table="$table" -dir="./model" --home="$HOME_DIR" -cache=true --style=goZero
# 移动生成的文件到目标目录
if (Test-Path $OUTPUT_DIR) {