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.
41 lines
1.0 KiB
41 lines
1.0 KiB
2 years ago
|
namespace Easy.AuthorityManagement.Clean.Domain.Entities;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 表示用户和角色之间的链接。
|
||
|
/// </summary>
|
||
|
public class IdentityUserRole : Entity<long>
|
||
|
{
|
||
|
public virtual long? TenantId { get; protected set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 获取或设置链接到角色的用户的主键。
|
||
|
/// </summary>
|
||
|
public virtual long UserId { get; protected set; }
|
||
|
public virtual IdentityUser User { get; protected set; }
|
||
|
|
||
|
|
||
|
/// <summary>
|
||
|
/// 获取或设置链接到用户的角色的主键。
|
||
|
/// </summary>
|
||
|
public virtual long 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(long userId, long roleId, long? tenantId)
|
||
|
{
|
||
|
UserId = userId;
|
||
|
RoleId = roleId;
|
||
|
TenantId = tenantId;
|
||
|
CreationTime = DateTime.Now;
|
||
|
}
|
||
|
|
||
|
}
|