using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; namespace Ewide.Core { /// /// 菜单表 /// [Table("sys_menu")] [Comment("菜单表")] public class SysMenu : DEntityBase { /// /// 父Id /// [Comment("父Id")] [Column("Pid", TypeName = "varchar(36)")] public string Pid { get; set; } /// /// 父Ids /// [Comment("父Ids")] public string Pids { get; set; } /// /// 名称 /// [Comment("名称")] public string Name { get; set; } /// /// 编码 /// [Comment("编码")] public string Code { get; set; } /// /// 菜单类型(字典 0目录 1菜单 2按钮) /// [Comment("菜单类型")] public int Type { get; set; } /// /// 图标 /// [Comment("图标")] public string Icon { get; set; } /// /// 路由地址 /// [Comment("路由地址")] public string Router { get; set; } /// /// 组件地址 /// [Comment("组件地址")] public string Component { get; set; } /// /// 权限标识 /// [Comment("权限标识")] public string Permission { get; set; } /// /// 应用分类(应用编码) /// [Comment("应用分类")] public string Application { get; set; } /// /// 打开方式(字典 0无 1组件 2内链 3外链) /// [Comment("打开方式")] public int OpenType { get; set; } = 0; /// /// 是否可见(Y-是,N-否) /// [Comment("是否可见")] [Column("Visible", TypeName = "bit")] public bool Visible { get; set; } = true; /// /// 内链地址 /// [Comment("内链地址")] public string Link { get; set; } /// /// 重定向地址 /// [Comment("重定向地址")] public string Redirect { get; set; } /// /// 权重(字典 1系统权重 2业务权重) /// [Comment("权重")] public int Weight { get; set; } = 2; /// /// 排序 /// [Comment("排序")] public int Sort { get; set; } = 100; /// /// 备注 /// [Comment("备注")] public string Remark { get; set; } /// /// 不关联上级菜单显示 0标识关联 1表示不需要关联菜单 仅按钮有效 /// [Comment("不关联菜单显示")] public int UnbindParent { get; set; } /// /// 状态(字典 0正常 1停用 2删除) /// public CommonStatus Status { get; set; } = CommonStatus.ENABLE; /// /// 多对多(角色) /// public ICollection SysRoles { get; set; } /// /// 多对多中间表(用户角色) /// public List SysRoleMenus { get; set; } } }