Merge branch 'dev' of github.com:wenjianzhang/go-admin into table/dev

 Conflicts:
	template/v2/dto.go.template
	template/v2/model.go.template
This commit is contained in:
linwenxiang committed 2020-09-14 20:06:35 +08:00
commit ca4ed89536
15 files changed
+61 -48

No files matched your search

+3 -2
View File
@@ -1,6 +1,8 @@
package models
import (
"gorm.io/gorm"
{{- if eq .IsActions 2 -}}
"go-admin/common/dto"
@@ -8,7 +10,6 @@ import (
orm "go-admin/common/global"
{{ end }}
"go-admin/common/models"
"gorm.io/gorm"
)
type {{.ClassName}} struct {
@@ -40,7 +41,7 @@ func (e *{{.ClassName}}) Generate() models.ActiveRecord {
}
func (e *{{.ClassName}}) GetId() interface{} {
return e.ID
return e.{{.PkGoField}}
}
func (e *{{.ClassName}}) SetCreateBy(createBy uint) {