初始化
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
//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)
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
//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"
|
||||
)
|
||||
Reference in New Issue
Block a user