You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
931 B
34 lines
931 B
using Easy.DDD.Domain.Entities;
|
|
|
|
namespace Identity.Api.DDD.Domain.Entites;
|
|
|
|
public class IdentityRole : AggregateRoot<Guid>
|
|
{
|
|
public virtual Guid? TenantId { get; protected set; }
|
|
/// <summary>
|
|
/// 获取或设置此角色的名称。
|
|
/// </summary>
|
|
public virtual string RoleName { get; protected internal set; }
|
|
/// <summary>
|
|
/// 获取或设置此角色的规范化名称。
|
|
/// </summary>
|
|
public virtual string NormalizedName { get; protected internal set; }
|
|
|
|
/// <summary>
|
|
/// Navigation property for the roles this user belongs to.
|
|
/// </summary>
|
|
public virtual ICollection<IdentityUserRole> Roles { get; protected set; }
|
|
|
|
public IdentityRole()
|
|
{
|
|
|
|
}
|
|
public IdentityRole(Guid id, string name, Guid? tenantId = null)
|
|
: base(id)
|
|
{
|
|
RoleName = name;
|
|
TenantId = tenantId;
|
|
NormalizedName = name.ToUpperInvariant();
|
|
}
|
|
|
|
}
|
|
|