ch some
This commit is contained in:
1 parent
28509eb4ca
commit
d1a6fcaadc
102 files changed
+2089
-1957
No files matched your search
@@ -7,24 +7,29 @@ type PermissionDTO struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
GuardName string `json:"guardName"`
|
||||
Module string `json:"module"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type CreatePermissionDTO struct {
|
||||
Code string `json:"code" binding:"required"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
GuardName string `json:"guardName" binding:"required"`
|
||||
Code string `json:"code" binding:"required"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
GuardName string `json:"guardName" binding:"required,oneof=web operator admin"`
|
||||
Module string `json:"module" binding:"required"`
|
||||
}
|
||||
|
||||
type UpdatePermissionDTO struct {
|
||||
Code string `json:"code" binding:"required"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
GuardName string `json:"guardName" binding:"required"`
|
||||
Code string `json:"code" binding:"required"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
GuardName string `json:"guardName" binding:"required,oneof=web operator admin"`
|
||||
Module string `json:"module" binding:"required"`
|
||||
}
|
||||
|
||||
type ListFilter struct {
|
||||
PermissionName string
|
||||
GuardName string
|
||||
Module string
|
||||
Page int
|
||||
Limit int
|
||||
}
|
||||
@@ -33,3 +38,17 @@ type ListPermissionDTO struct {
|
||||
Count int64 `json:"count"`
|
||||
Permissions []PermissionDTO `json:"permissions"`
|
||||
}
|
||||
|
||||
type PermissionTreeDTO struct {
|
||||
Guards []GuardModulesDTO `json:"guards"`
|
||||
}
|
||||
|
||||
type GuardModulesDTO struct {
|
||||
GuardName string `json:"guardName"`
|
||||
Modules []ModulePermissionsDTO `json:"modules"`
|
||||
}
|
||||
|
||||
type ModulePermissionsDTO struct {
|
||||
Module string `json:"module"`
|
||||
Permissions []PermissionDTO `json:"permissions"`
|
||||
}
|
||||
Reference in new issue
Block a user