mirror of
https://gitcode.com/flipped-aurora/gin-vue-admin.git
synced 2026-05-16 20:27:49 +00:00
* feature:增加顶栏组合模式。
* Update:
1. request.go.tpl and model.go.tpl indent problem
2. api.go.tpl, request.go.tpl, service.go.tpl struct {}
* Update:
1. model.go.tpl import blank line
* feature:增加顶栏组合模式。
* feature:增加左侧检测逻辑保证存在左侧菜单。
---------
Co-authored-by: SliverHorn <caiwei.lai@jutze.com.cn>
41 lines
1.6 KiB
Smarty
41 lines
1.6 KiB
Smarty
package request
|
|
|
|
import (
|
|
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
|
{{ if or .HasSearchTimer .GvaModel}}"time"{{ end }}
|
|
)
|
|
|
|
type {{.StructName}}Search struct{
|
|
{{- if .GvaModel }}
|
|
StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
|
|
EndCreatedAt *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
|
|
{{- end }}
|
|
{{- range .Fields}}
|
|
{{- if ne .FieldSearchType ""}}
|
|
{{- if eq .FieldSearchType "BETWEEN" "NOT BETWEEN"}}
|
|
Start{{.FieldName}} *{{.FieldType}} `json:"start{{.FieldName}}" form:"start{{.FieldName}}"`
|
|
End{{.FieldName}} *{{.FieldType}} `json:"end{{.FieldName}}" form:"end{{.FieldName}}"`
|
|
{{- else }}
|
|
{{- if eq .FieldType "enum" }}
|
|
{{.FieldName}} string `json:"{{.FieldJson}}" form:"{{.FieldJson}}"`
|
|
{{- else if eq .FieldType "picture" }}
|
|
{{.FieldName}} string `json:"{{.FieldJson}}" form:"{{.FieldJson}}" `
|
|
{{- else if eq .FieldType "video" }}
|
|
{{.FieldName}} string `json:"{{.FieldJson}}" form:"{{.FieldJson}}" `
|
|
{{- else if eq .FieldType "richtext" }}
|
|
{{.FieldName}} string `json:"{{.FieldJson}}" form:"{{.FieldJson}}" `
|
|
{{- else if ne .FieldType "string" }}
|
|
{{.FieldName}} *{{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" `
|
|
{{- else }}
|
|
{{.FieldName}} {{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" `
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end}}
|
|
{{- end }}
|
|
request.PageInfo
|
|
{{- if .NeedSort}}
|
|
Sort string `json:"sort" form:"sort"`
|
|
Order string `json:"order" form:"order"`
|
|
{{- end}}
|
|
}
|