// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995
//
// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证
namespace Admin.NET.Core;
///
/// 系统菜单表
///
[SugarTable(null, "系统菜单表")]
[SysTable]
[SugarIndex("index_{table}_T", nameof(Title), OrderByType.Asc)]
[SugarIndex("index_{table}_T2", nameof(Type), OrderByType.Asc)]
public class SysMenu : EntityBase
{
///
/// 父Id
///
[SugarColumn(ColumnDescription = "父Id")]
public long Pid { get; set; }
///
/// 菜单类型(1目录 2菜单 3按钮)
///
[SugarColumn(ColumnDescription = "菜单类型")]
public MenuTypeEnum Type { get; set; }
///
/// 路由名称
///
[SugarColumn(ColumnDescription = "路由名称", Length = 64)]
[MaxLength(64)]
public string? Name { get; set; }
///
/// 路由地址
///
[SugarColumn(ColumnDescription = "路由地址", Length = 128)]
[MaxLength(128)]
public string? Path { get; set; }
///
/// 组件路径
///
[SugarColumn(ColumnDescription = "组件路径", Length = 128)]
[MaxLength(128)]
public string? Component { get; set; }
///
/// 重定向
///
[SugarColumn(ColumnDescription = "重定向", Length = 128)]
[MaxLength(128)]
public string? Redirect { get; set; }
///
/// 权限标识
///
[SugarColumn(ColumnDescription = "权限标识", Length = 128)]
[MaxLength(128)]
public string? Permission { get; set; }
///
/// 菜单名称
///
[SugarColumn(ColumnDescription = "菜单名称", Length = 64)]
[Required, MaxLength(64)]
public virtual string Title { get; set; }
///
/// 图标
///
[SugarColumn(ColumnDescription = "图标", Length = 128)]
[MaxLength(128)]
public string? Icon { get; set; }
///
/// 是否内嵌
///
[SugarColumn(ColumnDescription = "是否内嵌")]
public bool IsIframe { get; set; }
///
/// 外链链接
///
[SugarColumn(ColumnDescription = "外链链接", Length = 256)]
[MaxLength(256)]
public string? OutLink { get; set; }
///
/// 是否隐藏
///
[SugarColumn(ColumnDescription = "是否隐藏")]
public bool IsHide { get; set; }
///
/// 是否缓存
///
[SugarColumn(ColumnDescription = "是否缓存")]
public bool IsKeepAlive { get; set; } = true;
///
/// 是否固定
///
[SugarColumn(ColumnDescription = "是否固定")]
public bool IsAffix { get; set; }
///
/// 排序
///
[SugarColumn(ColumnDescription = "排序")]
public int OrderNo { get; set; } = 100;
///
/// 状态
///
[SugarColumn(ColumnDescription = "状态")]
public StatusEnum Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
[SugarColumn(ColumnDescription = "备注", Length = 256)]
[MaxLength(256)]
public string? Remark { get; set; }
///
/// 菜单子项
///
[SugarColumn(IsIgnore = true)]
public List Children { get; set; } = new List();
}