This commit is contained in:
Mrx
2026-02-04 13:33:21 +08:00
parent e7c2ddbd93
commit e1fbf72437
23 changed files with 190 additions and 65 deletions

View File

@@ -1,7 +1,7 @@
# 设置输出编码为UTF-8
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
# 数据库连接信息 - 修改了URL格式
$DB_URL = "tydata:5vg67b3UNHu8@(127.0.0.1:21001)/tydata"
$DB_URL = "znc:5vg67b3UNHu823@tcp(localhost:21101)/znc"
$OUTPUT_DIR = "./model"
$TEMPLATE_DIR = "../template"
@@ -12,7 +12,7 @@ $tables = @(
# "agent_audit",
# "agent_closure",
# "agent_commission"
"agent_wallet_transaction"
# "agent_wallet_transaction"
# "agent_commission_deduction"
# "agent_link",
# "agent_membership_config",
@@ -37,7 +37,7 @@ $tables = @(
# "query_cleanup_log"
# "query_cleanup_detail"
# "query_cleanup_config"
# "user"
"user"
# "user_auth"
# "user_temp"
# "example"
@@ -60,5 +60,5 @@ $tables = @(
# 为每个表生成模型
foreach ($table in $tables) {
goctl model mysql datasource -url="tydata:5vg67b3UNHu8@tcp(127.0.0.1:21001)/tydata" -table="$table" -dir="./model" --home="../template" -cache=true --style=goZero
goctl model mysql datasource -url="znc:5vg67b3UNHu823@tcp(localhost:21101)/znc" -table="$table" -dir="./model" --home="../template" -cache=true --style=goZero
}

View File

@@ -0,0 +1,2 @@
-- 为用户表添加 disable 字段0 可用1 禁用,默认 0
ALTER TABLE `user` ADD COLUMN `disable` tinyint NOT NULL DEFAULT 0 COMMENT '0可用 1禁用' AFTER `inside`;