feat✨ :添加行政区域基础数据
This commit is contained in:
1 parent
19e96a01de
commit
b8ec705e0a
24 files changed
+530
-54
No files matched your search
@@ -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) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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}}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user