/*
 * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Admin\Models\ErrorViewModel.cs
 * Created: 2025-10-23
 * Last Modified: 2025-10-23
 * Description: Error view model for Admin project error handling and display
 * Last Edit Notes: Individual file implementation for ASP.NET Core MVC error handling in Admin dashboard
 */

namespace ShadowedRealms.Admin.Models
{
    /// <summary>
    /// View model for displaying error information in the Admin project
    /// </summary>
    public class ErrorViewModel
    {
        /// <summary>
        /// Unique identifier for the current request
        /// </summary>
        public string? RequestId { get; set; }

        /// <summary>
        /// Whether to show the request ID on the error page
        /// </summary>
        public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);

        /// <summary>
        /// Error message to display to the user
        /// </summary>
        public string? ErrorMessage { get; set; }

        /// <summary>
        /// HTTP status code for the error
        /// </summary>
        public int StatusCode { get; set; } = 500;

        /// <summary>
        /// Detailed error information (only shown in development)
        /// </summary>
        public string? DetailedError { get; set; }

        /// <summary>
        /// When the error occurred
        /// </summary>
        public DateTime ErrorTime { get; set; } = DateTime.UtcNow;

        /// <summary>
        /// Whether this error should be logged
        /// </summary>
        public bool ShouldLog { get; set; } = true;
    }
}