add customized.tpl for model template (#4086)

Co-authored-by: sudaoxyz <sudaoxyz@gmail.com>
This commit is contained in:
suyhuai
2024-04-18 22:40:54 +08:00
committed by GitHub
parent 1540bdc4c9
commit e1f15efb3b
5 changed files with 144 additions and 20 deletions

View File

@@ -7,6 +7,11 @@ import (
"github.com/zeromicro/go-zero/tools/goctl/util"
)
// Customized defines a template for customized in model
//
//go:embed tpl/customized.tpl
var Customized string
// Vars defines a template for var block in model
//
//go:embed tpl/var.tpl
@@ -51,6 +56,7 @@ package {{.pkg}}
{{.update}}
{{.extraMethod}}
{{.tableName}}
{{.customized}}
`, util.DoNotEditHead)
// Insert defines a template for insert code in model