using Easy.DDD.Domain.Entities; namespace IdentityServer.DDD.Domain.Entites; public class IdentityRole : AggregateRoot { public virtual Guid? TenantId { get; protected set; } /// /// 获取或设置此角色的名称。 /// public virtual string RoleName { get; protected internal set; } /// /// Navigation property for the roles this user belongs to. /// public virtual ICollection Roles { get; protected set; } public IdentityRole() { } public IdentityRole(Guid id, string name, Guid? tenantId = null) : base(id) { RoleName = name; TenantId = tenantId; } public IdentityRole SetName(string roleName) { RoleName = roleName; return this; } }