mirror of https://github.com/abpframework/abp
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.
45 lines
1.2 KiB
45 lines
1.2 KiB
using System;
|
|
using Volo.Abp.Domain.Entities.Auditing;
|
|
using Volo.Abp.MultiTenancy;
|
|
|
|
namespace Volo.Abp.Identity
|
|
{
|
|
/// <summary>
|
|
/// Represents membership of a User to an OU.
|
|
/// </summary>
|
|
public class IdentityUserOrganizationUnit : CreationAuditedEntity, IMultiTenant
|
|
{
|
|
/// <summary>
|
|
/// TenantId of this entity.
|
|
/// </summary>
|
|
public virtual Guid? TenantId { get; protected set; }
|
|
|
|
/// <summary>
|
|
/// Id of the User.
|
|
/// </summary>
|
|
public virtual Guid UserId { get; protected set; }
|
|
|
|
/// <summary>
|
|
/// Id of the related <see cref="OrganizationUnit"/>.
|
|
/// </summary>
|
|
public virtual Guid OrganizationUnitId { get; protected set; }
|
|
|
|
protected IdentityUserOrganizationUnit()
|
|
{
|
|
|
|
}
|
|
|
|
public IdentityUserOrganizationUnit(Guid userId, Guid organizationUnitId, Guid? tenantId = null)
|
|
{
|
|
UserId = userId;
|
|
OrganizationUnitId = organizationUnitId;
|
|
TenantId = tenantId;
|
|
}
|
|
|
|
public override object[] GetKeys()
|
|
{
|
|
return new object[] { UserId, OrganizationUnitId };
|
|
}
|
|
}
|
|
}
|