using Admin.Core.Common.BaseModel; using FreeSql.DataAnnotations; namespace Admin.Core.Model.Admin { /// /// 权限 /// [Table(Name = "ad_permission")] [Index("idx_{tablename}_01", nameof(ParentId) + "," + nameof(Label), true)] public class PermissionEntity : EntityFull { /// /// 父级节点 /// public long ParentId { get; set; } /// /// 权限名称 /// [Column(StringLength = 50)] public string Label { get; set; } /// /// 权限编码 /// [Column(StringLength = 550)] public string Code { get; set; } /// /// 权限类型 /// [Column(MapType = typeof(int),CanUpdate = false)] public PermissionType Type { get; set; } /// /// 视图 /// public long? ViewId { get; set; } public ViewEntity View { get; set; } /// /// 接口 /// public long? ApiId { get; set; } public ApiEntity Api { get; set; } /// /// 菜单访问地址 /// [Column(StringLength = 500)] public string Path { get; set; } /// /// 图标 /// [Column(StringLength = 100)] public string Icon { get; set; } /// /// 隐藏 /// public bool Hidden { get; set; } = false; /// /// 启用 /// public bool Enabled { get; set; } = true; /// /// 可关闭 /// public bool? Closable { get; set; } /// /// 打开组 /// public bool? Opened { get; set; } /// /// 打开新窗口 /// public bool? NewWindow { get; set; } /// /// 链接外显 /// public bool? External { get; set; } /// /// 排序 /// public int? Sort { get; set; } = 0; /// /// 描述 /// [Column(StringLength = 100)] public string Description { get; set; } } }