123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- using System.ComponentModel.DataAnnotations;
- using MessagePack.Formatters;
- using MiniExcelLibs.Attributes;
- namespace Dto
- {
- public class MenuDto
- {
- //{"parentId":0,"menuName":"aaa","icon":"documentation","menuType":"M","orderNum":999,"visible":0,"status":0,"path":"aaa"}
- [ExcelColumn(Name = "菜单id")]
- public int menuId { get; set; }
- [ExcelColumn(Name = "菜单名")]
- public string? name { get; set; }
- public string? enName { get; set; }
- /// <summary>
- /// 父菜单ID
- /// </summary>
- public long parentId { get; set; }
- /// <summary>
- /// 显示顺序
- /// </summary>
- public int sortOrder { get; set; }
- /// <summary>
- /// 路由地址
- /// </summary>
- [ExcelColumn(Name = "路由地址")]
- public string? path { get; set; } = "#";
- /// <summary>
- /// 组件路径
- /// </summary>
- [ExcelColumn(Name = "组件地址")]
- public string? component { get; set; }
- /// <summary>
- /// 是否缓存(1缓存 0不缓存)
- /// </summary>
- [Required(ErrorMessage = "是否缓存不能为空")]
- [ExcelColumn(Name = "是否缓存")]
- public int keepAlive { get; set; }
- /// <summary>
- /// 是否外链 1、是 0、否
- /// </summary>
- public int embedded { get; set; }
- /// <summary>
- /// 类型(M目录 C菜单 F按钮 L链接)
- /// </summary>
- [Required(ErrorMessage = "菜单类型不能为空")]
- public string? menuType { get; set; }
- /// <summary>
- /// 显示状态(0显示 1隐藏)
- /// </summary>
- [Required(ErrorMessage = "显示状态不能为空")]
- public string? visible { get; set; }
- /// <summary>
- /// 菜单状态(0正常 1停用)
- /// </summary>
- // [Required(ErrorMessage = "菜单状态不能为空")]
- // public string? status { get; set; }
- /// <summary>
- /// 权限字符串
- /// </summary>
- public string? permission { get; set; }
- /// <summary>
- /// 菜单图标
- /// </summary>
- public string? icon { get; set; }
- /// <summary>
- /// 翻译key
- /// </summary>
- public string? menuNameKey { get; set; }
- public List<MenuDto> children { get; set; } = new List<MenuDto>();
- }
- public class MenuQueryDto
- {
- public string? menuName { get; set; }
- public string? visible { get; set; }
- public string? delFlag { get; set; }
- public string? menuTypeIds { get; set; }
- public int? parentId { get; set; }
- // public string[] menuTypeIdArr
- // {
- // get
- // {
- // return menuTypeIds?.Split(',', StringSplitOptions.RemoveEmptyEntries);
- // }
- // }
- }
- public class RoleMenuQueryDto
- {
- public int roleId { get; set; }
- }
- }
|