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