87 lines
2.0 KiB
C#
87 lines
2.0 KiB
C#
using MediatR;
|
|
using System.Collections.Generic;
|
|
using TakeoutSaaS.Application.Identity.Contracts;
|
|
|
|
namespace TakeoutSaaS.Application.Identity.Commands;
|
|
|
|
/// <summary>
|
|
/// 更新菜单命令。
|
|
/// </summary>
|
|
public sealed record UpdateMenuCommand : IRequest<MenuDefinitionDto?>
|
|
{
|
|
/// <summary>
|
|
/// 菜单 ID。
|
|
/// </summary>
|
|
public long Id { get; init; }
|
|
|
|
/// <summary>
|
|
/// 父级菜单 ID。
|
|
/// </summary>
|
|
public long ParentId { get; init; }
|
|
|
|
/// <summary>
|
|
/// 菜单名称。
|
|
/// </summary>
|
|
public string Name { get; init; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 路由路径。
|
|
/// </summary>
|
|
public string Path { get; init; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 前端组件路径。
|
|
/// </summary>
|
|
public string Component { get; init; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 显示标题。
|
|
/// </summary>
|
|
public string Title { get; init; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 图标。
|
|
/// </summary>
|
|
public string? Icon { get; init; }
|
|
|
|
/// <summary>
|
|
/// 是否外链。
|
|
/// </summary>
|
|
public bool IsIframe { get; init; }
|
|
|
|
/// <summary>
|
|
/// 外链地址。
|
|
/// </summary>
|
|
public string? Link { get; init; }
|
|
|
|
/// <summary>
|
|
/// 是否缓存。
|
|
/// </summary>
|
|
public bool KeepAlive { get; init; }
|
|
|
|
/// <summary>
|
|
/// 排序序号。
|
|
/// </summary>
|
|
public int SortOrder { get; init; }
|
|
|
|
/// <summary>
|
|
/// 访问所需权限。
|
|
/// </summary>
|
|
public IReadOnlyCollection<string> RequiredPermissions { get; init; } = [];
|
|
|
|
/// <summary>
|
|
/// 元信息权限。
|
|
/// </summary>
|
|
public IReadOnlyCollection<string> MetaPermissions { get; init; } = [];
|
|
|
|
/// <summary>
|
|
/// 元信息角色。
|
|
/// </summary>
|
|
public IReadOnlyCollection<string> MetaRoles { get; init; } = [];
|
|
|
|
/// <summary>
|
|
/// 按钮权限集合。
|
|
/// </summary>
|
|
public IReadOnlyCollection<MenuAuthItemDto> AuthList { get; init; } = [];
|
|
}
|