using Easy.DDD.Domain.Entities;
using Easy.DDD.Domain.Auditing;
namespace Identity.Api.Clean.Domain.Entites;
///
/// 表示用户对 OU 的成员资格。
///
public class OrganizationUnitRole : Entity, IHasCreationTime
{
///
/// 租户 ID.
///
public Guid? TenantId { get; protected set; }
///
/// 角色 ID.
///
public Guid RoleId { get; protected set; }
///
/// 组织Id
///
public Guid OrganizationUnitId { get; protected set; }
///
/// 创建时间
///
public DateTime CreationTime { get; set; }
public OrganizationUnitRole()
{
}
///
/// 初始化一个新的实例 类.
///
/// 租户Id
/// 用户 ID.
/// 组织Id.
public OrganizationUnitRole(Guid roleId, Guid organizationUnitId, Guid? tenantId = null)
{
RoleId = roleId;
OrganizationUnitId = organizationUnitId;
TenantId = tenantId;
CreationTime = DateTime.Now;
}
}