Files
go-zero/tools/goctl/model/sql/template/tpl/model-new.tpl

8 lines
334 B
Smarty
Raw Normal View History

func new{{.upperStartCamelObject}}Model(conn sqlx.SqlConn{{if .withCache}}, c cache.CacheConf, opts ...cache.Option{{end}}) *default{{.upperStartCamelObject}}Model {
return &default{{.upperStartCamelObject}}Model{
{{if .withCache}}CachedConn: sqlc.NewConn(conn, c, opts...){{else}}conn:conn{{end}},
table: {{.table}},
2020-07-29 17:11:41 +08:00
}
}