using Furion.DatabaseAccessor; using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace YBEE.EQM.Core { /// /// 菜单表 /// [Comment("菜单")] public partial class SysMenu : IEntity { /// /// 主键 /// [Comment("主键")] [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } /// /// 父Id /// [Comment("父Id")] public int Pid { get; set; } /// /// 父Ids /// [Comment("父Ids")] public string Pids { get; set; } /// /// 名称 /// [Comment("名称")] [Required, MaxLength(20)] public string Name { get; set; } /// /// 编码 /// [Comment("编码")] [Required, MaxLength(50)] public string Code { get; set; } /// /// 菜单类型(字典 0目录 1菜单 2按钮) /// [Comment("菜单类型")] [Required] public MenuType MenuType { get; set; } /// /// 图标 /// [Comment("图标")] [MaxLength(20)] public string Icon { get; set; } /// /// 路由地址 /// [Comment("路由地址")] [MaxLength(100)] public string Router { get; set; } /// /// 组件地址 /// [Comment("组件地址")] [MaxLength(100)] public string Component { get; set; } /// /// 权限标识 /// [Comment("权限标识")] [MaxLength(100)] public string Permission { get; set; } /// /// 打开方式(字典 0无 1组件 2内链 3外链) /// [Comment("打开方式")] [Required] public MenuOpenType OpenType { get; set; } = MenuOpenType.NONE; /// /// 是否可见 /// [Comment("是否可见")] [Required, MaxLength(5)] public bool Visible { get; set; } = true; /// /// 内链地址 /// [Comment("内链地址")] [MaxLength(100)] public string Link { get; set; } /// /// 重定向地址 /// [Comment("重定向地址")] [MaxLength(100)] public string Redirect { get; set; } /// /// 排序 /// [Comment("排序")] [Required] public int Sort { get; set; } = 0; /// /// 备注 /// [Comment("备注")] [MaxLength(100)] public string Remark { get; set; } /// /// 状态 /// [Comment("状态")] [Required] public CommonStatus Status { get; set; } = CommonStatus.ENABLE; } }