Quanxue.Zhanghao.Daochu/LearningOfficer.OA.Common/Dtos/Menus/MenuAddDto.cs

131 lines
2.7 KiB
C#

using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LearningOfficer.OA.Common.Dtos.Menus
{
public class MenuAddDto
{
/// <summary>
/// 备 注:菜单名称
/// 默认值:
///</summary>
public string Title { get; set; } = null!;
/// <summary>
/// 备 注:父级菜单id
/// 默认值:
///</summary>
public long ParentId { get; set; }
/// <summary>
/// 备 注:序号
/// 默认值:
///</summary>
public int Sort { get; set; }
/// <summary>
/// 备 注:路由路径
/// 默认值:
///</summary>
public string Path { get; set; } = null!;
/// <summary>
/// 备 注:菜单图标
/// 默认值:
///</summary>
public string Icon { get; set; } = null!;
/// 备 注:组件
/// 默认值:
///</summary>
public string Component { get; set; } = null!;
}
public class MenuUpdateDto : MenuAddDto
{
/// <summary>
/// 备 注:菜单id
/// 默认值:
///</summary>
public long Id { get; set; }
}
public class MenuFrontEndDto
{
public long Id { get; set; }
/// <summary>
/// 备 注:菜单名称
/// 默认值:
///</summary>
public string Title { get; set; } = null!;
/// <summary>
/// 备 注:父级菜单id
/// 默认值:
///</summary>
public long ParentId { get; set; }
/// <summary>
/// 备 注:序号
/// 默认值:
///</summary>
public int Sort { get; set; }
/// <summary>
/// 备 注:路由路径
/// 默认值:
///</summary>
public string Path { get; set; } = null!;
/// <summary>
/// 备 注:菜单图标
/// 默认值:
///</summary>
public string Icon { get; set; } = null!;
/// 备 注:组件
/// 默认值:
///</summary>
public string Component { get; set; } = null!;
public MenuMeta Meta
{
get
{
return new MenuMeta
{
Title = this.Title,
Icon = this.Icon
};
}
}
public List<MenuFrontEndDto> Children { get; set; }
}
public class MenuMeta
{
/// <summary>
/// 备 注:菜单名称
/// 默认值:
///</summary>
public string Title { get; set; } = null!;
public string Icon { get; set; }
}
}