gen :update import

This commit is contained in:
zhangwenjian committed 2020-08-01 14:43:38 +08:00
1 parent 88a458a003
commit c98f38cab4
1 file changed
+4 -1
+4 -1
View File
@@ -3,7 +3,10 @@ package models
import ( import (
orm "go-admin/global" orm "go-admin/global"
"go-admin/tools" "go-admin/tools"
_ "time" {{$ii := 1}}
{{ range .Columns }}
{{- if eq .GoType "time.Time" -}}{{- if eq $ii 1 -}} "time" {{$ii = 2}}{{- end}}{{- end}}
{{- end }}
) )
type {{.ClassName}} struct { type {{.ClassName}} struct {