feat: RBAC 基本完成

This commit is contained in:
Blizzard
2025-09-14 21:58:44 +08:00
parent 2ec091bf59
commit 9be75d53fe
35 changed files with 615 additions and 87 deletions
+5 -5
View File
@@ -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{}