fix(change model template file type): All model template variables ar… (#2573)

* fix(change model template file type): All model template variables are stored in tpl format files with the same name as the template generated using the template init command

* fix(change model template file type): All model template variables are stored in tpl format files with the same name as the template generated using the template init command

Co-authored-by: qilvge <qilvge@.qilvge.com>
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
This commit is contained in:
骑着毛驴背单词
2022-11-10 13:38:35 +08:00
committed by GitHub
parent 1677a4dceb
commit 81831b60a9
28 changed files with 232 additions and 215 deletions

View File

@@ -0,0 +1,6 @@
func new{{.upperStartCamelObject}}Model(conn sqlx.SqlConn{{if .withCache}}, c cache.CacheConf{{end}}) *default{{.upperStartCamelObject}}Model {
return &default{{.upperStartCamelObject}}Model{
{{if .withCache}}CachedConn: sqlc.NewConn(conn, c){{else}}conn:conn{{end}},
table: {{.table}},
}
}