1 Star 0 Fork 0

none_zhu/transport-system

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gen_wms_gen_test.go 967 Bytes
一键复制 编辑 原始数据 按行查看 历史
none_zhu 提交于 2023-12-21 23:44 . 111
package main
import (
"gorm.io/gen"
"testing"
"transport/framework/fw_config"
"transport/framework/fw_db/fw_db_wms"
"transport/framework/fw_log"
)
func TestWmsGen(t *testing.T) {
fw_log.ZapInit()
fw_config.ConfigInit()
fw_db_wms.InitDB()
g := gen.NewGenerator(gen.Config{
ModelPkgPath: "./server/modelGen/wms",
/* Mode: gen.WithoutContext|gen.WithDefaultQuery*/
//if you want the nullable field generation property to be pointer type, set FieldNullable true
//FieldNullable: true,
//if you want to generate index tags from database, set FieldWithIndexTag true
FieldWithIndexTag: true,
//if you want to generate type tags from database, set FieldWithTypeTag true
FieldWithTypeTag: true,
//if you need unit tests for query code, set WithUnitTest true
WithUnitTest: true,
})
g.UseDB(fw_db_wms.GetSqlserverDB())
g.GenerateModel("wm_outbound_order_header")
//g.GenerateAllTable()
// execute the action of code generation
g.Execute()
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/iotplc/transport-system.git
git@gitee.com:iotplc/transport-system.git
iotplc
transport-system
transport-system
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385