using IamService.Domain.SeedWork;

namespace IamService.Domain.Events;

/// <summary>
/// EN: Domain event raised when a role is assigned to a user.
/// VI: Domain event được raise khi role được gán cho user.
/// </summary>
public class RoleAssignedDomainEvent : IDomainEvent
{
    public Guid UserId { get; }
    public Guid RoleId { get; }
    public string RoleName { get; }
    public DateTime OccurredOn { get; }

    public RoleAssignedDomainEvent(Guid userId, Guid roleId, string roleName)
    {
        UserId = userId;
        RoleId = roleId;
        RoleName = roleName;
        OccurredOn = DateTime.UtcNow;
    }
}
