Add ent schema to starter

This commit is contained in:
Achim Rohn
2025-09-14 16:34:52 +02:00
parent 92488618a9
commit fae6653f94
25 changed files with 3982 additions and 7 deletions
+28
View File
@@ -0,0 +1,28 @@
package main
import (
"ersteller-lib/starter/create"
"log"
"path"
"entgo.io/ent/entc"
"entgo.io/ent/entc/gen"
)
func main() {
log.Println("starter generate schema")
thisDir := create.GetPathToThisDir()
paginationPath := path.Join(thisDir, "../../schema/ent/pagination_query.tmpl")
must(entc.Generate(
"./ent/schema",
&gen.Config{},
entc.TemplateFiles(paginationPath),
))
}
func must(err error) {
if err != nil {
log.Fatal(err)
}
}