123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- using Vo;
- namespace Model
- {
- /// <summary>
- /// 菜单权限表 sys_menu
- /// </summary>
- [SugarTable("sys_menu", "菜单权限表")]
- [Tenant("0")]
- public class SysMenu
- {
- /// <summary>
- /// 菜单ID
- /// </summary>
- [SugarColumn(ColumnDescription = "菜单ID", IsPrimaryKey = true, IsIdentity = true, ColumnName = "menu_id")]
- public long menuId { get; set; }
- /// <summary>
- /// 菜单名称
- /// </summary>
- [SugarColumn(ColumnDescription = "菜单名称", Length = 32, ColumnName = "name")]
- public string? name { get; set; }
- /// <summary>
- /// 英文名称
- /// </summary>
- [SugarColumn(ColumnDescription = "英文名称", Length = 128, ColumnName = "en_name")]
- public string? enName { get; set; }
- /// <summary>
- /// 权限标识
- /// </summary>
- [SugarColumn(ColumnDescription = "权限标识", Length = 32, ColumnName = "permission")]
- public string? permission { get; set; }
- /// <summary>
- /// 路由路径
- /// </summary>
- [SugarColumn(ColumnDescription = "路由路径", Length = 128, ColumnName = "path")]
- public string? path { get; set; }
- /// <summary>
- /// 父菜单ID
- /// </summary>
- [SugarColumn(ColumnDescription = "父菜单ID", ColumnName = "parent_id")]
- public long parentId { get; set; }
- /// <summary>
- /// 菜单图标
- /// </summary>
- [SugarColumn(ColumnDescription = "菜单图标", Length = 64, ColumnName = "icon")]
- public string? icon { get; set; }
- /// <summary>
- /// 是否可见,0隐藏,1显示
- /// </summary>
- [SugarColumn(ColumnDescription = "是否可见,0隐藏,1显示", Length = 1, ColumnName = "visible")]
- public string? visible { get; set; }
- /// <summary>
- /// 排序值,越小越靠前
- /// </summary>
- [SugarColumn(ColumnDescription = "排序值,越小越靠前", ColumnName = "sort_order")]
- public int sortOrder { get; set; }
- /// <summary>
- /// 是否缓存,0否,1是
- /// </summary>
- [SugarColumn(ColumnDescription = "是否缓存,0否,1是", Length = 1, ColumnName = "keep_alive")]
- public string? keepAlive { get; set; }
- /// <summary>
- /// 是否内嵌,0否,1是
- /// </summary>
- [SugarColumn(ColumnDescription = "是否内嵌,0否,1是", Length = 1, ColumnName = "embedded")]
- public string? embedded { get; set; }
- /// <summary>
- /// 菜单类型,0目录,1菜单,2按钮
- /// </summary>
- [SugarColumn(ColumnDescription = "菜单类型,0目录,1菜单,2按钮", Length = 1, ColumnName = "menu_type")]
- public string? menuType { get; set; }
- /// <summary>
- /// 创建人
- /// </summary>
- [SugarColumn(ColumnDescription = "创建人", Length = 64, ColumnName = "create_by")]
- public string? CreateBy { get; set; }
- /// <summary>
- /// 创建时间
- /// </summary>
- [SugarColumn(ColumnDescription = "创建时间", ColumnName = "create_time")]
- public DateTime? CreateTime { get; set; }
- /// <summary>
- /// 修改人
- /// </summary>
- [SugarColumn(ColumnDescription = "修改人", Length = 64, ColumnName = "update_by")]
- public string? UpdateBy { get; set; }
- /// <summary>
- /// 更新时间
- /// </summary>
- [SugarColumn(ColumnDescription = "更新时间", ColumnName = "update_time")]
- public DateTime? UpdateTime { get; set; }
- /// <summary>
- /// 删除标志,0未删除,1已删除
- /// </summary>
- [SugarColumn(ColumnDescription = "删除标志,0未删除,1已删除", Length = 1, ColumnName = "del_flag")]
- public string? DelFlag { get; set; }
- [SugarColumn(IsIgnore = true)]
- public TreeSelectMeta meta { get; set; }
- [SugarColumn(IsIgnore = true)]
- public long id { get; set; }
- /// <summary>
- /// 子菜单
- /// </summary>
- [SugarColumn(IsIgnore = true)]
- public List<SysMenu> children { get; set; } = new List<SysMenu>();
- /// <summary>
- /// 子菜单个数
- /// </summary>
- [SugarColumn(IsIgnore = true)]
- public int subNum { get; set; }
- /// <summary>
- /// 是否包含子节点,前端用
- /// </summary>
- [SugarColumn(IsIgnore = true)]
- public bool hasChildren
- {
- get
- {
- return subNum > 0 || children.Count > 0;
- }
- }
- }
- }
|