权限管理接口实现
This commit is contained in:
@@ -130,3 +130,8 @@ func Query(in any) url.Values {
|
||||
|
||||
return out
|
||||
}
|
||||
|
||||
// 数据请求
|
||||
type IdReq struct {
|
||||
Id int32 `json:"id"`
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ type Model struct {
|
||||
ID int32 `json:"id" gorm:"column:id;primaryKey"`
|
||||
CreatedAt time.Time `json:"created_at" gorm:"column:created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at"`
|
||||
DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"column:deleted_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at"`
|
||||
}
|
||||
|
||||
func (m *Model) GetID() int32 {
|
||||
|
||||
10
web/core/scopes.go
Normal file
10
web/core/scopes.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package core
|
||||
|
||||
const (
|
||||
ScopePermissionRead = string("permission:read")
|
||||
ScopePermissionWrite = string("permission:write")
|
||||
ScopeAdminRoleRead = string("admin_role:read")
|
||||
ScopeAdminRoleWrite = string("admin_role:write")
|
||||
ScopeAdminRead = string("admin:read")
|
||||
ScopeAdminWrite = string("admin:write")
|
||||
)
|
||||
Reference in New Issue
Block a user