mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-26 11:28:46 +08:00
c9494c8bc7
* model support globbing patterns * optimize model * optimize model * format code
11 lines
322 B
Go
11 lines
322 B
Go
package template
|
|
|
|
var New = `
|
|
func New{{.upperStartCamelObject}}Model(conn sqlx.SqlConn{{if .withCache}}, c cache.CacheConf{{end}}) *{{.upperStartCamelObject}}Model {
|
|
return &{{.upperStartCamelObject}}Model{
|
|
{{if .withCache}}CachedConn: sqlc.NewConn(conn, c){{else}}conn:conn{{end}},
|
|
table: "{{.table}}",
|
|
}
|
|
}
|
|
`
|