#region ========================================================================= USING ===================================================================================== using Lumina.Application.Common.DataAccess.Entities.Common; using Lumina.Domain.SharedKernel.Common.Enums.Authorization; using System; using System.Collections.Generic; using System.Diagnostics; #endregion namespace Lumina.Application.Common.DataAccess.Entities.Authorization; /// /// Repository entity for a permission in the authorization system. /// [DebuggerDisplay("RoleName: {RoleName}")] public class RoleEntity : IStorageEntity, IAuditableEntity { /// /// Gets the Id of the role. /// public Guid Id { get; init; } /// /// Gets the name of the role. /// public required string RoleName { get; init; } /// /// Gets or sets the collection of user roles associations that include this role. /// public ICollection UserRoles { get; set; } = []; /// /// Gets or sets the collection of role permission associations that include this role. /// public ICollection RolePermissions { get; set; } = []; /// /// 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; } }