You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
3.1 KiB
96 lines
3.1 KiB
using SqlSugar;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using WoodWood.Util.Validations;
|
|
|
|
namespace Wood.Entity.SystemManage
|
|
{
|
|
/// <summary>
|
|
/// 菜单信息
|
|
/// </summary>
|
|
[SugarTable("SysMenu", "菜单信息")]
|
|
public class MenuEntity : EntityBaseExtra
|
|
{
|
|
/// <summary>
|
|
/// 父级id
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "父级id", DefaultValue = "0")]
|
|
public long ParentId { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 名称
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "名称", DefaultValue = "0",Length =32)]
|
|
[Required]
|
|
public string MenuName { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 路由名称
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "路由名称", DefaultValue = "0", Length = 32, IsNullable = true)]
|
|
public string? RouteName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 路由路径
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "路由路径", DefaultValue = "0", IsNullable = true)]
|
|
public string? RoutePath { get; set; }
|
|
|
|
/// <summary>
|
|
/// 组件路径
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "组件路径", DefaultValue = "0", IsNullable = true)]
|
|
public string? ComponentPath { get; set; }
|
|
|
|
/// <summary>
|
|
/// 菜单图标
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "菜单图标", DefaultValue = "0", Length = 32, IsNullable = true)]
|
|
public string? MenuIcon { get; set; }
|
|
|
|
/// <summary>
|
|
/// 重定向路径
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "重定向路径", DefaultValue = "0", IsNullable = true)]
|
|
public string? RedirectPath { get; set; }
|
|
|
|
/// <summary>
|
|
/// 是否缓存
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "是否缓存")]
|
|
public bool IsCache { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// 是否新页面打开
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "是否新页面打开")]
|
|
public bool OpenNewWindow { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// 是否固定
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "是否固定")]
|
|
public bool IsAffix { get; set; } = false;
|
|
/// <summary>
|
|
/// 外链
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "外链", Length = 256, IsNullable = true)]
|
|
public string? OutLink { get; set; }
|
|
/// <summary>
|
|
/// 权限标识
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "权限标识", Length = 128, IsNullable = true)]
|
|
[UniqueValue(ErrorMessage ="权限标识不能重复!")]
|
|
public string? Permission { get; set; }
|
|
/// <summary>
|
|
/// 排序
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "排序", DefaultValue = "0")]
|
|
public int Sort { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 菜单类型 1 目录 2 菜单 3 按钮
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "菜单类型 1 目录 2 菜单 3 按钮", DefaultValue = "1")]
|
|
public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Directory;
|
|
}
|
|
}
|
|
|