mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-27 12:28:40 +08:00
f4471846ff
Resolves: #1710
30 lines
490 B
Go
30 lines
490 B
Go
package template
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/zeromicro/go-zero/tools/goctl/util"
|
|
)
|
|
|
|
// ModelGen defines a template for model
|
|
var ModelGen = fmt.Sprintf(`%s
|
|
|
|
package {{.pkg}}
|
|
{{.imports}}
|
|
{{.vars}}
|
|
{{.types}}
|
|
{{.new}}
|
|
{{.insert}}
|
|
{{.find}}
|
|
{{.update}}
|
|
{{.delete}}
|
|
{{.extraMethod}}
|
|
`, util.DoNotEditHead)
|
|
|
|
// ModelCustom defines a template for extension
|
|
var ModelCustom = fmt.Sprintf(`package {{.pkg}}
|
|
type {{.upperStartCamelObject}}Model interface {
|
|
{{.lowerStartCamelObject}}Model
|
|
}
|
|
`)
|