【修改】template模板

This commit is contained in:
PandaGoAdmin
2022-01-26 14:14:32 +08:00
parent 7723626e79
commit 200e203bd6
3 changed files with 56 additions and 10 deletions

View File

@@ -4,9 +4,14 @@
// 生成人:{{.FunctionAuthor}}
// ==========================================================================
package entity
{{$hasGTime:=true}}
{{if $hasGTime}}import "time"{{end}}
{{$hasGTime:=false}}
{{- range $index, $column := .Columns -}}
{{- if eq $column.GoType "Time" -}}
{{$hasGTime = true}}
{{- end -}}
{{- end -}}
{{if $hasGTime -}}import "time"{{- end }}
type {{.ClassName}} struct {