【修改】template模板

This commit is contained in:
PandaGoAdmin
2022-01-26 16:27:37 +08:00
parent c6ebe89865
commit f55212cd0b
6 changed files with 222 additions and 107 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 {