using System; using FreeSql.DataAnnotations; using System.ComponentModel.DataAnnotations; using System.Collections.Generic; namespace Admin.Core.Model.Admin { /// /// 角色 /// [Table(Name = "ad_role")] [Index("uk_role_name", "Name", true)] public class RoleEntity: EntityBase { /// /// 名称 /// [MaxLength(50)] public string Name { get; set; } /// /// 说明 /// [Column(DbType = "varchar(100)")] public string Description { get; set; } /// /// 启用 /// public bool Enabled { get; set; } = true; /// /// 排序 /// public int Sort { get; set; } [Navigate(ManyToMany = typeof(UserRoleEntity))] public virtual ICollection Users { get; set; } } }