#region ========================================================================= USING ===================================================================================== using Nemera.Application.Common.DataAccess.Entities.Common; using System; using System.Diagnostics; #endregion namespace Nemera.Application.Common.DataAccess.Entities.Authorization; /// /// Represents the association between a role and a permission within the authorization system. /// [DebuggerDisplay("Role: {Role.RoleName}; Permission: {Permission.PermissionName}")] public class RolePermissionEntity : IStorageEntity, IAuditableEntity { /// /// Gets the Id of the role permission. /// public Guid Id { get; init; } /// /// Gets the Id of the role of the role permission. /// public required Guid RoleId { get; init; } /// /// Gets the role of the role permission. /// public required RoleEntity Role { get; init; } /// /// Gets the Id of the permission of the role permissions. /// public required Guid PermissionId { get; init; } /// /// Gets the permission of the role permission. /// public required PermissionEntity Permission { get; init; } /// /// Gets or sets the time and date when the entity was added. /// public DateTime CreatedOnUtc { get; set; } /// /// Gets or sets the Id of the user that created the entity. /// public Guid CreatedBy { get; set; } /// /// Gets or sets the optional time and date when the entity was updated. /// public DateTime? UpdatedOnUtc { get; set; } /// /// Gets or sets the optional Id of the user that updated the entity. /// public Guid? UpdatedBy { get; set; } }