using SqlSugar; using System.Collections.Generic; namespace ARW.Model.System { /// /// Sys_menu表 /// [SugarTable("sys_menu")] [Tenant("0")] public class SysMenu : SysBase { /// /// 菜单ID /// //[Key]//非自动增长主键时使用ExplicitKey [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public long MenuId { get; set; } /// /// 菜单名称 /// public string MenuName { get; set; } /// /// 父菜单ID /// public long parentId { get; set; } /// /// 显示顺序 /// public int orderNum { get; set; } /// /// 路由地址 /// public string path { get; set; } = "#"; /// /// 组件路径 /// [SugarColumn(IsNullable = true)] public string component { get; set; } /// /// 是否缓存(1缓存 0不缓存) /// public string isCache { get; set; } /// /// 是否外链 1、是 0、否 /// public string isFrame { get; set; } /// /// 类型(M目录 C菜单 F按钮 L链接) /// public string menuType { get; set; } /// /// 显示状态(0显示 1隐藏) /// public string visible { get; set; } /// /// 菜单状态(0正常 1停用) /// public string status { get; set; } /// /// 权限字符串 /// [SugarColumn(IsNullable = true)] public string perms { get; set; } /// /// 菜单图标 /// [SugarColumn(IsNullable = true)] public string icon { get; set; } = string.Empty; /// /// 菜单名key /// [SugarColumn(ColumnName = "menuName_key", IsNullable = true)] public string MenuNameKey { get; set; } /// /// 子菜单 /// [SugarColumn(IsIgnore = true)] public List children { get; set; } = new List(); /// /// 子菜单个数 /// [SugarColumn(IsIgnore = true)] public int SubNum { get; set; } /// /// 是否包含子节点,前端用 /// [SugarColumn(IsIgnore = true)] public bool HasChildren { get { return SubNum > 0 || children.Count > 0; } } } }