This commit is contained in:
Mrx
2026-02-02 13:15:13 +08:00
parent e30a5d3342
commit e44793c89e
15 changed files with 97 additions and 39 deletions

View File

@@ -1,7 +1,8 @@
# 设置输出编码为UTF-8
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
# 数据库连接信息 - 修改了URL格式
$DB_URL = "xingfucha:5vg67b3UNHu8@(127.0.0.1:21001)/xingfucha"
# $DB_URL = "xingfucha:5vg67b3UNHu8@(127.0.0.1:21001)/xingfucha"
$DB_URL = "xfc:xfc5vg67b3UNHu8@(127.0.0.1:23201)/xfc"
$OUTPUT_DIR = "./model"
$TEMPLATE_DIR = "../template"
@@ -38,7 +39,7 @@ $tables = @(
# "query_cleanup_log"
# "query_cleanup_detail"
# "query_cleanup_config"
# "user"
"user"
# "user_auth"
# "user_temp"
# "example"
@@ -60,5 +61,6 @@ $tables = @(
# 为每个表生成模型
foreach ($table in $tables) {
goctl model mysql datasource -url="xingfucha:5vg67b3UNHu8@tcp(127.0.0.1:21001)/xingfucha" -table="$table" -dir="./model" --home="../template" -cache=true --style=goZero
# goctl model mysql datasource -url="xingfucha:5vg67b3UNHu8@tcp(127.0.0.1:21001)/xingfucha" -table="$table" -dir="./model" --home="../template" -cache=true --style=goZero
goctl model mysql datasource -url="xfc:xfc5vg67b3UNHu8@tcp(127.0.0.1:23201)/xfc" -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`;