namespace ZR.Model.System { /// /// Sys_menu表 /// [SugarTable("sys_menu", "系统菜单表")] [Tenant("0")] public class SysMenu : SysBase { /// /// 菜单ID /// [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public long MenuId { get; set; } /// /// 菜单名称 /// [SugarColumn(Length = 50, ExtendedAttribute = ProteryConstant.NOTNULL)] public string MenuName { get; set; } /// /// 父菜单ID /// [SugarColumn(DefaultValue = "0")] public long ParentId { get; set; } /// /// 显示顺序 /// [SugarColumn(DefaultValue = "0")] public int OrderNum { get; set; } /// /// 路由地址 /// public string Path { get; set; } = ""; /// /// 组件路径 /// public string Component { get; set; } /// /// 是否缓存(1不缓存 0缓存) /// [SugarColumn(DefaultValue = "0", ColumnDataType = "int")] public string IsCache { get; set; } = "0"; /// /// 是否外链 1、是 0、否 /// [SugarColumn(DefaultValue = "0", ColumnDataType = "int")] public string IsFrame { get; set; } = "0"; /// /// 类型(M目录 C菜单 F按钮 L链接) /// [SugarColumn(Length = 1)] public string MenuType { get; set; } = string.Empty; /// /// 显示状态(0显示 1隐藏) /// [SugarColumn(DefaultValue = "0")] public string Visible { get; set; } /// /// 菜单状态(0正常 1停用) /// [SugarColumn(DefaultValue = "0")] public string Status { get; set; } /// /// 权限字符串 /// [SugarColumn(Length = 100)] public string Perms { get; set; } /// /// 菜单图标 /// [SugarColumn(DefaultValue = "#")] public string Icon { get; set; } = string.Empty; /// /// 菜单名key /// [SugarColumn(ColumnName = "menuName_key")] public string MenuNameKey { get; set; } /// /// 路由参数 /// public string Query { 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; } } /// /// 路由名 /// public string RouteName { get; set; } } }