feat:added dto
This commit is contained in:
1 parent
33b462217c
commit
ce80857d5f
7 files changed
+144
-60
No files matched your search
@@ -0,0 +1,12 @@
|
||||
package dto
|
||||
|
||||
type {{.ClassName}}Search struct {
|
||||
{{ $tablename := .TBName -}}
|
||||
{{ 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}}
|
||||
|
||||
{{end -}}
|
||||
{{- end }}
|
||||
}
|
||||
Reference in new issue
Block a user