Ai
1 Star 0 Fork 0

liming/Scheduler

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Permission.cs 3.19 KB
一键复制 编辑 原始数据 按行查看 历史
liming 提交于 2025-08-03 11:49 +08:00 . 移动端初始化提交
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Scheduler.Model
{
/// <summary>
/// 路由菜单表
/// </summary>
//[Table("permission")]
[Comment("路由菜单表")]
public class Permission : BaseEntity
{
/// <summary>
/// 菜单执行Action名
/// </summary>
[Comment("菜单执行Action名")]
[StringLength(50)]
[Required]
public string? Code { get; set; }
/// <summary>
/// 菜单显示名(如用户页、编辑(按钮)、删除(按钮))
/// </summary>
[Comment("菜单显示名(如用户页、编辑(按钮)、删除(按钮))")]
[StringLength(50)]
[Required]
public string? Name { get; set; }
/// <summary>
/// 是否是按钮
/// </summary>
[Comment("是否是按钮")]
[Required]
public bool IsButton { get; set; } = false;
/// <summary>
/// 是否是隐藏菜单
/// </summary>
[Comment("是否是隐藏菜单")]
[Required]
public bool? IsHide { get; set; } = false;
/// <summary>
/// 是否keepAlive
/// </summary>
[Comment("是否keepAlive")]
[Required]
public bool? IskeepAlive { get; set; } = false;
/// <summary>
/// 按钮事件
/// </summary>
[Comment("按钮事件")]
[StringLength(100)]
public string? Func { get; set; }
/// <summary>
/// 排序
/// </summary>
[Comment("排序")]
[Required]
public int OrderSort { get; set; }
/// <summary>
/// 菜单图标
/// </summary>
[Comment("菜单图标")]
[StringLength(100)]
[Required]
public string? Icon { get; set; }
/// <summary>
/// 菜单描述
/// </summary>
[Comment("菜单描述")]
[StringLength(100)]
public string? Description { get; set; }
/// <summary>
/// 激活状态
/// </summary>
[Comment("激活状态")]
public bool Enabled { get; set; }
/// <summary>
///
/// </summary>
[NotMapped]
public List<string?> PnameArr { get; set; } = new List<string?>();
/// <summary>
///
/// </summary>
[NotMapped]
public List<string?> PCodeArr { get; set; } = new List<string?>();
/// <summary>
/// 菜单名称
/// </summary>
[NotMapped]
public string? MName { get; set; }
/// <summary>
/// 是否有子级
/// </summary>
[NotMapped]
public bool hasChildren { get; set; } = true;
/// <summary>
/// 接口API地址信息表
/// </summary>
[NotMapped]
public Modules? Module { get; set; }
/// <summary>
/// 菜单Id
/// </summary>
[NotMapped]
public int? Key { get; set; }
/// <summary>
/// 父级菜单Id
/// </summary>
[NotMapped]
public int? ParentKey { get; set; } = 0;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/cplmlm/scheduler.git
git@gitee.com:cplmlm/scheduler.git
cplmlm
scheduler
Scheduler
master

搜索帮助