using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Models { [SugarIndex("index_{table}_code", nameof(Right.Code), OrderByType.Asc, isUnique: true)] public class Right : BaseTable { public Right() { } public Right(string code,string name,string groupName="默认") { Code=code; Name=name; GroupName=groupName; CreateUserCode = "admin"; ModifyUserCode = "admin"; } public bool check { get; set; } public string GroupName { get; set; }//分组名 [SugarColumn(Length = 16)] public string Code { get; set; } public string Name { get; set; } //用于根据权限查所有角色时用 //[Navigate(typeof(RoleRightMap), nameof(RoleRightMap.RightId), nameof(RoleRightMap.RoleId))]//注意顺序 //public List RoleList { get; set; } } }