diff --git a/src/super/dao/user_open_permission_dao.go b/src/super/dao/user_open_permission_dao.go index ec9c5ef..f22b0d6 100644 --- a/src/super/dao/user_open_permission_dao.go +++ b/src/super/dao/user_open_permission_dao.go @@ -8,7 +8,7 @@ type UserOpenPermissionDao interface { type GetUserOpenPermissionResp struct { model.UserOpenPermission `xorm:"extends"` - model.Permission `xorm:"extends"` + model.OpenPermission `xorm:"extends"` } func (GetUserOpenPermissionResp) TableName() string { diff --git a/src/super/model/open_permission.go b/src/super/model/open_permission.go new file mode 100644 index 0000000..bfd236a --- /dev/null +++ b/src/super/model/open_permission.go @@ -0,0 +1,10 @@ +package model + +type OpenPermission struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Name string `json:"name" xorm:"not null default '' comment('名称') VARCHAR(255)"` + Action string `json:"action" xorm:"not null default '' comment('路由') unique VARCHAR(255)"` + State int `json:"state" xorm:"not null default 1 comment('状态(1:正常 2:废弃)') TINYINT(1)"` + CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` + UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` +}