using SqlSugar; using System; namespace New_College.Model.Models { /// /// 按钮跟权限关联表 /// public class RoleModulePermission { public RoleModulePermission() { //this.Role = new Role(); //this.Module = new Module(); //this.Permission = new Permission(); } /// /// ID /// [SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } /// ///获取或设置是否禁用,逻辑上的删除,非物理删除 /// [SugarColumn(IsNullable = true)] public bool? IsDeleted { get; set; } /// /// 角色ID /// public int RoleId { get; set; } /// /// 菜单ID /// public int ModuleId { get; set; } /// /// api ID /// [SugarColumn(IsNullable = true)] public int? PermissionId { 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(IsIgnore = true)] public Role Role { get; set; } [SugarColumn(IsIgnore = true)] public Modules Module { get; set; } [SugarColumn(IsIgnore = true)] public Permission Permission { get; set; } } }