Init V4 community edition (#2265)

* Init V4 community edition

* Init V4 community edition
This commit is contained in:
AaronLiu
2025-04-20 17:31:25 +08:00
committed by GitHub
parent da4e44b77a
commit 21d158db07
597 changed files with 119415 additions and 41692 deletions

29
ent/entc.go Normal file
View File

@@ -0,0 +1,29 @@
//go:build ignore
package main
import (
"log"
"entgo.io/ent/entc"
"entgo.io/ent/entc/gen"
)
func main() {
if err := entc.Generate("./schema", &gen.Config{
Features: []gen.Feature{
gen.FeatureIntercept,
gen.FeatureSnapshot,
gen.FeatureUpsert,
gen.FeatureUpsert,
gen.FeatureExecQuery,
},
Templates: []*gen.Template{
gen.MustParse(gen.NewTemplate("edge_helper").ParseFiles("templates/edgehelper.tmpl")),
gen.MustParse(gen.NewTemplate("mutation_helper").ParseFiles("templates/mutationhelper.tmpl")),
gen.MustParse(gen.NewTemplate("create_helper").ParseFiles("templates/createhelper.tmpl")),
},
}); err != nil {
log.Fatal("running ent codegen:", err)
}
}