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:
commit
ca4ed89536
15 files changed
+61
-48
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user