fix code gen problem.

This commit is contained in:
horizonzy committed 2022-01-31 12:00:26 +08:00
1 parent e2c5075319
commit 3cfa7a2767
2 files changed
+18 -5

No files matched your search

+14 -1
View File
@@ -1,9 +1,22 @@
package models
import (
// "gorm.io/gorm"
{{- $bb := false -}}
{{- range .Columns -}}
{{$z := .IsQuery}}
{{- if ($z) }}
{{if eq .GoType "time.Time"}}{{- $bb = true -}}{{- end -}}
{{- end -}}
{{- end -}}
{{- range .Columns -}}
{{if eq .GoType "time.Time"}}{{- $bb = true -}}{{- end -}}
{{- end -}}
{{- if eq $bb true -}}
"time"
{{- end }}
"go-admin/common/models"
)
type {{.ClassName}} struct {