using e_suite.Database.Audit;
using Microsoft.AspNetCore.Mvc;

namespace eSuite.API.Utilities;

/// <summary>
/// MVC controller which also has supporting functions for the application.
/// </summary>
public class ESuiteController : Controller
{
    /// <summary>
    /// Contains the details of the currently logged in user.  This should be passed on to the audit module to make audit tracking easy.
    /// </summary>
    /// <remarks>Set the comment property to include the comment into the audit log</remarks>
    protected AuditUserDetails AuditUserDetails =>
        new()
        {
            UserId = User.Id(),
            UserDisplayName = User.DisplayName()
        };
}