This commit is contained in:
2026-08-16 09:02:39 +08:00
parent c554152f4f
commit f7f6db8695
105 changed files with 2535 additions and 948 deletions
+25 -14
View File
@@ -1,5 +1,7 @@
package dto
import "time"
type MenuMetaRequest struct {
ActiveName string `json:"activeName"`
KeepAlive bool `json:"keepAlive"`
@@ -58,7 +60,7 @@ type GetAuthorityMenusRequest struct {
}
type SetMenuRolesRequest struct {
MenuID uint `json:"menuId"`
MenuID uint `json:"menuId" form:"menuId"`
AuthorityIDs []uint `json:"authorityIds"`
}
@@ -73,22 +75,29 @@ type MenuMetaResponse struct {
}
type MenuButtonResponse struct {
ID uint `json:"ID"`
Name string `json:"name"`
Description string `json:"desc"`
SysBaseMenuID uint `json:"sysBaseMenuID"`
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
ID uint `json:"ID"`
Name string `json:"name"`
Description string `json:"desc"`
SysBaseMenuID uint `json:"sysBaseMenuID"`
}
type MenuParameterResponse struct {
ID uint `json:"ID"`
SysBaseMenuID uint `json:"SysBaseMenuID"`
Type string `json:"type"`
Key string `json:"key"`
Value string `json:"value"`
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
ID uint `json:"ID"`
SysBaseMenuID uint `json:"SysBaseMenuID"`
Type string `json:"type"`
Key string `json:"key"`
Value string `json:"value"`
}
type MenuResponse struct {
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
ID uint `json:"ID"`
MenuID uint `json:"menuId,omitempty"`
ParentID uint `json:"parentId"`
Path string `json:"path"`
Name string `json:"name"`
@@ -103,8 +112,10 @@ type MenuResponse struct {
}
type AuthorityMenuResponse struct {
MenuID uint `json:"menuId"`
AuthorityID uint `json:"authorityId"`
SysBaseMenu *MenuResponse `json:"sysBaseMenu"`
ParentID uint `json:"parentId"`
// The administration response embeds the base-menu fields, so menu fields are
// flat in the response (there is no sysBaseMenu envelope). Keep the
// authority ID internal, matching the compatible json:"-" field.
*MenuResponse
MenuID uint `json:"menuId"`
AuthorityID uint `json:"-"`
}