You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
459 B
Batchfile
18 lines
459 B
Batchfile
3 years ago
|
@echo off
|
||
2 years ago
|
chcp 65001
|
||
|
@echo 开始代码生成
|
||
3 years ago
|
|
||
2 years ago
|
set tables=user_integral
|
||
3 years ago
|
set targetDir=.\model
|
||
|
set templateDir=..\..\doc\template
|
||
|
|
||
3 years ago
|
set host=127.0.0.1
|
||
3 years ago
|
set port=3306
|
||
|
set dbname=dmgame
|
||
3 years ago
|
set username=root
|
||
|
set password=root
|
||
|
|
||
|
for %%i in (%tables%) do (
|
||
2 years ago
|
echo 正在生成数据库 %dbname% 的表 %%i 的golang代码
|
||
3 years ago
|
goctl model mysql datasource --url "%username%:%password%@tcp(%host%:%port%)/%dbname%" -t %%i -d %targetDir% --style go_zero --home %templateDir%
|
||
|
)
|