using System; using System.Collections.Generic; using Admin.Core.Common.BaseModel; using FreeSql.DataAnnotations; namespace Admin.Core.Model.Admin { /// /// 角色 /// [Table(Name = "ad_role")] [Index("idx_{tablename}_01", nameof(Name), true)] public class RoleEntity: EntityFull { /// /// 名称 /// [Column(StringLength = 50)] public string Name { get; set; } /// /// 说明 /// [Column(StringLength = 200)] public string Description { get; set; } /// /// 启用 /// public bool Enabled { get; set; } = true; /// /// 排序 /// public int Sort { get; set; } [Navigate(ManyToMany = typeof(UserRoleEntity))] public ICollection Users { get; set; } [Navigate(ManyToMany = typeof(RolePermissionEntity))] public ICollection Permissions { get; set; } } }