using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace New_College.Model.Models
{
///
/// 路由菜单表
///
public class Permission
{
public Permission()
{
//this.ModulePermission = new List();
//this.RoleModulePermission = new List();
}
///
/// ID
///
[SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
///
/// 菜单执行Action名
///
[SugarColumn(ColumnDataType = "nvarchar", Length = 50, IsNullable = true)]
public string Code { get; set; }
///
/// 菜单显示名(如用户页、编辑(按钮)、删除(按钮))
///
[SugarColumn(ColumnDataType = "nvarchar", Length = 50, IsNullable = true)]
public string Name { get; set; }
///
/// 是否是按钮
///
public bool IsButton { get; set; } = false;
///
/// 组件类型(0,为button或菜单,1为下拉框,2...)
///
public int ModuleType { get; set; } = 0;
///
/// 是否是隐藏菜单
///
[SugarColumn(IsNullable = true)]
public bool? IsHide { get; set; } = false;
///
/// 是否keepAlive
///
[SugarColumn(IsNullable = true)]
public bool? IskeepAlive { get; set; } = false;
///
/// 按钮事件
///
[SugarColumn(ColumnDataType = "nvarchar", Length = 100, IsNullable = true)]
public string Func { get; set; }
///
/// 上一级菜单(0表示上一级无菜单)
///
public int Pid { get; set; }
///
/// 接口api
///
public int Mid { get; set; }
///
/// 排序
///
public int OrderSort { get; set; }
///
/// 菜单图标
///
[SugarColumn(ColumnDataType = "nvarchar", Length = 100, IsNullable = true)]
public string Icon { get; set; }
///
/// 菜单描述
///
[SugarColumn(ColumnDataType = "nvarchar", Length = 100, IsNullable = true)]
public string Description { get; set; }
///
/// 激活状态
///
public bool Enabled { get; set; }
///
/// 创建ID
///
[SugarColumn(IsNullable = true)]
public int? CreateId { get; set; }
///
/// 创建者
///
[SugarColumn(ColumnDataType = "nvarchar", Length = 50, IsNullable = true)]
public string CreateBy { get; set; }
///
/// 创建时间
///
[SugarColumn(IsNullable = true)]
public DateTime? CreateTime { get; set; } = DateTime.Now;
///
/// 修改ID
///
[SugarColumn(IsNullable = true)]
public int? ModifyId { get; set; }
///
/// 修改者
///
[SugarColumn(ColumnDataType = "nvarchar", Length = 50, IsNullable = true)]
public string ModifyBy { get; set; }
///
/// 修改时间
///
[SugarColumn(IsNullable = true)]
public DateTime? ModifyTime { get; set; } = DateTime.Now;
///
///获取或设置是否禁用,逻辑上的删除,非物理删除
///
[SugarColumn(IsNullable = true)]
public bool? IsDeleted { get; set; }
[SugarColumn(IsIgnore = true)]
public List PidArr { get; set; }
[SugarColumn(IsIgnore = true)]
public List PnameArr { get; set; } = new List();
[SugarColumn(IsIgnore = true)]
public List PCodeArr { get; set; } = new List();
[SugarColumn(IsIgnore = true)]
public string MName { get; set; }
[SugarColumn(IsIgnore = true)]
public bool hasChildren { get; set; } = true;
//public virtual ICollection ModulePermission { get; set; }
//public virtual ICollection RoleModulePermission { get; set; }
}
}