update: set orm log

This commit is contained in:
zhangwenjian committed 2020-08-29 17:52:59 +08:00
1 parent c210d2301c
commit 55496078f0
5 files changed
+36 -38

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ type {{.ClassName}}Search struct {
{{ range .Columns -}}
{{$z := .IsQuery}}
{{- if ($z) -}}
{{.GoField}} {{.GoType}} `form:"{{.JsonField}}" gorm:"type:{{if eq .QueryType "EQ"}}exact{{ else if eq .QueryType "NE"}}iexact{{ else if eq .QueryType "LIKE"}}contains{{ else if eq .QueryType "GT"}}gt{{ else if eq .QueryType "GTE"}}gte{{ else if eq .QueryType "LT"}}lt{{ else if eq .QueryType "LTE"}}lte{{- end }};column:{{.ColumnName}};table:{{$tablename}}"` // {{.ColumnComment}}
{{.GoField}} {{.GoType}} `form:"{{.JsonField}}" search:"type:{{if eq .QueryType "EQ"}}exact{{ else if eq .QueryType "NE"}}iexact{{ else if eq .QueryType "LIKE"}}contains{{ else if eq .QueryType "GT"}}gt{{ else if eq .QueryType "GTE"}}gte{{ else if eq .QueryType "LT"}}lt{{ else if eq .QueryType "LTE"}}lte{{- end }};column:{{.ColumnName}};table:{{$tablename}}"` // {{.ColumnComment}}
{{end -}}
{{- end }}