初始化2

This commit is contained in:
SunYF
2026-08-28 15:06:01 +08:00
parent b34325a16f
commit a9c3fbeb41
537 changed files with 176215 additions and 17 deletions
+24
View File
@@ -0,0 +1,24 @@
//go:build ignore
package main
import (
"log"
"entgo.io/ent/entc"
"entgo.io/ent/entc/gen"
)
func main() {
err := entc.Generate("./schema", &gen.Config{
Package: "bj_power_wms/ent",
Target: "./ent",
Features: []gen.Feature{
gen.FeatureVersionedMigration,
gen.FeatureUpsert,
},
})
if err != nil {
log.Fatalf("running ent codegen: %v", err)
}
}
+14
View File
@@ -0,0 +1,14 @@
//go:build tools
package tools
// 此文件仅用于锁定 codegen 工具依赖,不参与业务编译。
// go mod tidy 会将这些依赖写入 go.mod。
import (
_ "ariga.io/atlas/sql/sqltool"
_ "entgo.io/ent/dialect/sql/schema"
_ "entgo.io/ent/entc"
_ "entgo.io/ent/entc/gen"
_ "github.com/go-openapi/inflect"
_ "golang.org/x/tools/go/packages"
)