using MongoDB.Bson;

namespace adas_core.Domain.Models.MongoModels;

/// <summary>
/// Represents an authorization mechanism that determines whether a principal is granted access to a protected resource or operation.
/// </summary>
public class Authorization
{
    public ObjectId Id { get; set; }

    public ObjectId UserId { get; set; }

    public string? Rol { get; set; } = string.Empty;

    public string? DisplayId { get; set; } = string.Empty;
    public string? UnitId { get; set; } = null;
    public bool PanelAuthorization { get; set; }
    public bool CanUpdate { get; set; } = true;

    #region NotMapped

    public Unit? Unit { get; set; }
    public Display? Display { get; set; }
    public User? User { get; set; }

    #endregion
}