Initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
namespace PowderCoating.Application.DTOs.QuickBooks;
|
||||
|
||||
/// <summary>
|
||||
/// A single entry in an import log — covers errors, warnings, and skipped records.
|
||||
/// </summary>
|
||||
public class ImportErrorDto
|
||||
{
|
||||
/// <summary>"Error", "Warning", or "Skipped"</summary>
|
||||
public string Severity { get; set; } = "Error";
|
||||
|
||||
public int LineNumber { get; set; }
|
||||
public string? RecordName { get; set; }
|
||||
public string? FieldName { get; set; }
|
||||
public string ErrorMessage { get; set; } = string.Empty;
|
||||
|
||||
public string DisplayMessage =>
|
||||
$"[{Severity}]" +
|
||||
(LineNumber > 0 ? $" Line {LineNumber}" : "") +
|
||||
(string.IsNullOrEmpty(RecordName) ? "" : $" ({RecordName})") +
|
||||
(string.IsNullOrEmpty(FieldName) ? "" : $" — {FieldName}") +
|
||||
$": {ErrorMessage}";
|
||||
}
|
||||
Reference in New Issue
Block a user