feat✨ :添加行政区域基础数据

This commit is contained in:
wenjianzhang committed 2021-02-26 01:05:20 +08:00
1 parent 19e96a01de
commit b8ec705e0a
24 files changed
+530 -54

No files matched your search

+2 -2
View File
@@ -72,7 +72,7 @@ func (s *{{.ClassName}}Control) Generate() (*models.{{.ClassName}}, error) {
{{ range .Columns -}}
{{$x := .Pk}}
{{- if ($x) }}
Model: gorm.Model{ID: s.ID},
Model: common.Model{ {{.GoField}}: s.{{.GoField}} },
{{- else if eq .GoField "CreatedAt" -}}
{{- else if eq .GoField "UpdatedAt" -}}
{{- else if eq .GoField "DeletedAt" -}}
@@ -120,4 +120,4 @@ func (s *{{.ClassName}}ById) Bind(ctx *gin.Context) error {
func (s *{{.ClassName}}ById) SetUpdateBy(id int) {
}
}
+2 -2
View File
@@ -7,7 +7,7 @@ import (
)
type {{.ClassName}} struct {
gorm.Model
models.Model
models.ControlBy
{{ range .Columns -}}
{{$x := .Pk}}
@@ -34,4 +34,4 @@ func (e *{{.ClassName}}) Generate() models.ActiveRecord {
func (e *{{.ClassName}}) GetId() interface{} {
return e.{{.PkGoField}}
}
}