feat: RBAC 基本完成
This commit is contained in:
@@ -29,20 +29,20 @@ func (r *PageInfo) Paginate() func(db *gorm.DB) *gorm.DB {
|
||||
|
||||
// GetById Find by id structure
|
||||
type GetById struct {
|
||||
ID int `json:"id" form:"id"` // 主键ID
|
||||
ID string `json:"id" form:"id"` // 主键ID
|
||||
}
|
||||
|
||||
func (r *GetById) Uint() uint {
|
||||
return uint(r.ID)
|
||||
func (r *GetById) Uint() string {
|
||||
return string(r.ID)
|
||||
}
|
||||
|
||||
type IdsReq struct {
|
||||
Ids []int `json:"ids" form:"ids"`
|
||||
Ids []string `json:"ids" form:"ids"`
|
||||
}
|
||||
|
||||
// GetAuthorityId Get role by id structure
|
||||
type GetAuthorityId struct {
|
||||
AuthorityId uint `json:"authorityId" form:"authorityId"` // 角色ID
|
||||
AuthorityId string `json:"authorityId" form:"authorityId"` // 角色ID
|
||||
}
|
||||
|
||||
type Empty struct{}
|
||||
|
||||
Reference in New Issue
Block a user