初始化2
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
//go:build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"entgo.io/ent/entc"
|
||||
"entgo.io/ent/entc/gen"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := entc.Generate(
|
||||
".",
|
||||
&gen.Config{
|
||||
Target: "../ent",
|
||||
Package: "bj_power_mes/ent",
|
||||
Features: []gen.Feature{
|
||||
gen.FeatureExecQuery,
|
||||
gen.FeatureLock,
|
||||
gen.FeatureModifier,
|
||||
gen.FeatureNamedEdges,
|
||||
},
|
||||
}); err != nil {
|
||||
log.Fatal("running ent codegen:", err)
|
||||
}
|
||||
log.Println("ent code generated successfully!")
|
||||
}
|
||||
Reference in New Issue
Block a user