using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using SqlSugar; using WIDESEAWCS_Core.DB.Models; using WIDESEAWCS_Core.Tenants; namespace WIDESEAWCS_Model.Models { [SugarTable("Sys_Role", "角色表"), MultiTenant] public class Sys_Role : BaseEntity { /// /// 主键 /// [SugarColumn(IsIdentity = true, IsPrimaryKey = true, ColumnDescription = "主键")] public int RoleId { get; set; } /// /// 部门名称 /// [SugarColumn(IsNullable = true, IsIgnore = true, Length = 50, ColumnDescription = "部门名称")] public string DeptName { get; set; } /// /// 部门主键 /// [SugarColumn(IsNullable = true, ColumnDescription = "部门主键")] public int? DeptId { get; set; } /// /// 是否启用 /// [SugarColumn(IsNullable = false, ColumnDescription = "是否启用")] public byte Enable { get; set; } /// /// 父ID /// [SugarColumn(IsNullable = false, ColumnDescription = "父ID")] public int ParentId { get; set; } /// /// 角色名称 /// [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "角色名称")] public string RoleName { get; set; } [Navigate(NavigateType.OneToMany, nameof(ParentId), nameof(RoleId)), SugarColumn(IsIgnore = true, IsNullable = true)] public List Roles { get; set; } } }