/*
* 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
{
///
/// View model for displaying error information in the Admin project
///
public class ErrorViewModel
{
///
/// Unique identifier for the current request
///
public string? RequestId { get; set; }
///
/// Whether to show the request ID on the error page
///
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
///
/// Error message to display to the user
///
public string? ErrorMessage { get; set; }
///
/// HTTP status code for the error
///
public int StatusCode { get; set; } = 500;
///
/// Detailed error information (only shown in development)
///
public string? DetailedError { get; set; }
///
/// When the error occurred
///
public DateTime ErrorTime { get; set; } = DateTime.UtcNow;
///
/// Whether this error should be logged
///
public bool ShouldLog { get; set; } = true;
}
}