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.
 
 
 
 
 

42 lines
1.0 KiB

using Easy.DDD.Domain.Entities;
namespace Identity.Api.Clean.Domain.Entites;
/// <summary>
/// 表示用户和角色之间的链接。
/// </summary>
public class IdentityUserRole : Entity<Guid>
{
public virtual Guid? TenantId { get; protected set; }
/// <summary>
/// 获取或设置链接到角色的用户的主键。
/// </summary>
public virtual Guid UserId { get; protected set; }
public virtual IdentityUser User { get; protected set; }
/// <summary>
/// 获取或设置链接到用户的角色的主键。
/// </summary>
public virtual Guid RoleId { get; protected set; }
public virtual IdentityRole Role { get; protected set; }
/// <summary>
/// 创建时间
/// </summary>
public virtual DateTime CreationTime { get; protected set; }
public IdentityUserRole()
{
}
protected internal IdentityUserRole(Guid userId, Guid roleId, Guid? tenantId)
{
UserId = userId;
RoleId = roleId;
TenantId = tenantId;
CreationTime = DateTime.Now;
}
}