Files
DMS/DMS.Application/DTOs/MenuBeanDto.cs

64 lines
1.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using DMS.Core.Enums;
namespace DMS.Application.DTOs;
/// <summary>
/// 菜单数据传输对象DTO
/// 用于在应用程序层和表示层之间传输菜单数据特别是在UI上显示菜单项时使用。
/// </summary>
public class MenuBeanDto
{
/// <summary>
/// 菜单项的唯一标识符
/// </summary>
public int Id { get; set; }
/// <summary>
/// 父级菜单项的ID用于构建层级菜单结构
/// 如果为0表示为顶级菜单项
/// </summary>
public int ParentId { get; set; }
/// <summary>
/// 菜单项显示的标题文本
/// </summary>
public string Header { get; set; }
/// <summary>
/// 菜单项显示的图标资源路径或标识符
/// </summary>
public string Icon { get; set; }
/// <summary>
/// 菜单的类型,例如菜单关联的是设备还是变量表或者是MQTT
/// 用于区分不同类型的菜单项,决定点击菜单项时的行为
/// </summary>
public MenuType MenuType { get; set; }
/// <summary>
/// 菜单关联的数据ID例如设备Id变量表Id
/// 根据MenuType的不同此ID可以指向不同的数据实体
/// </summary>
public int TargetId { get; set; }
/// <summary>
/// 目标视图的键值,用于导航到特定的视图页面
/// </summary>
public string TargetViewKey { get; set; }
/// <summary>
/// 导航参数,传递给目标视图的额外参数信息
/// </summary>
public string NavigationParameter { get; set; }
/// <summary>
/// 菜单项在同级菜单中的显示顺序
/// 数值越小显示越靠前
/// </summary>
public int DisplayOrder { get; set; }
/// <summary>
/// 子菜单项集合,用于构建层级菜单结构
/// </summary>
public List<MenuBeanDto> Children { get; set; } = new List<MenuBeanDto>();
}