feat(role): Add sequence field to RoleMenuResponse and update ToRoleResponse mapping
Deploy Application / deploy (push) Successful in 21s
Details
Deploy Application / deploy (push) Successful in 21s
Details
This commit is contained in:
parent
e83a114390
commit
13e6c86acb
|
|
@ -96,14 +96,15 @@ type RoleResponse struct {
|
|||
// ClientID string `json:"client_id"`
|
||||
Client pkgdto.IdNameResponse `json:"client"`
|
||||
Permissions []RolePermissionsResponse `json:"permissions,omitempty"`
|
||||
Menus []RoleMenuResponse `json:"menus,omitempty"`
|
||||
Menus []RoleMenuResponse `json:"menus,omitempty"`
|
||||
}
|
||||
|
||||
type RoleMenuResponse struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
IconUrl string `json:"icon_url"`
|
||||
Url string `json:"url"`
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
IconUrl string `json:"icon_url"`
|
||||
Url string `json:"url"`
|
||||
Sequence int `json:"sequence"`
|
||||
}
|
||||
|
||||
type RolePermissionsResponse struct {
|
||||
|
|
|
|||
|
|
@ -482,10 +482,11 @@ func ToRoleResponse(role entities.M_Role) dto.RoleResponse {
|
|||
var menus []dto.RoleMenuResponse
|
||||
for _, m := range role.Menus {
|
||||
menus = append(menus, dto.RoleMenuResponse{
|
||||
ID: m.ID.String(),
|
||||
Name: m.Name,
|
||||
IconUrl: m.IconUrl,
|
||||
Url: m.Url,
|
||||
ID: m.ID.String(),
|
||||
Name: m.Name,
|
||||
IconUrl: m.IconUrl,
|
||||
Url: m.Url,
|
||||
Sequence: m.Sequence,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue