Initial commit
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using CsvHelper.Configuration.Attributes;
|
||||
|
||||
namespace PowderCoating.Application.DTOs.Import;
|
||||
|
||||
/// <summary>
|
||||
/// DTO for importing jobs from CSV files.
|
||||
/// CustomerEmail is the preferred customer lookup key; CustomerName is used as a fallback
|
||||
/// when the customer has no email address on file (the importer tries email first, then name).
|
||||
/// </summary>
|
||||
public class JobImportDto
|
||||
{
|
||||
// "Job Number" = old export header (spaced); "JobNumber" = current header
|
||||
[Name("JobNumber", "Job Number")]
|
||||
public string? JobNumber { get; set; }
|
||||
|
||||
// Optional — importer falls back to CustomerName when blank
|
||||
[Name("CustomerEmail")]
|
||||
public string? CustomerEmail { get; set; }
|
||||
|
||||
// Fallback identifier when CustomerEmail is absent; matched against CompanyName
|
||||
[Name("CustomerName")]
|
||||
public string? CustomerName { get; set; }
|
||||
|
||||
[Name("Status")]
|
||||
public string Status { get; set; } = "Pending";
|
||||
|
||||
[Name("Priority")]
|
||||
public string Priority { get; set; } = "Normal";
|
||||
|
||||
[Name("ScheduledDate")]
|
||||
public DateTime? ScheduledDate { get; set; }
|
||||
|
||||
// "Due Date" = old export header (spaced); "DueDate" = current header
|
||||
[Name("DueDate", "Due Date")]
|
||||
public DateTime? DueDate { get; set; }
|
||||
|
||||
// "Final Price" = old export header (spaced); "FinalPrice" = current header
|
||||
[Name("FinalPrice", "Final Price")]
|
||||
public decimal? FinalPrice { get; set; }
|
||||
|
||||
[Name("CustomerPO")]
|
||||
public string? CustomerPO { get; set; }
|
||||
|
||||
[Name("SpecialInstructions")]
|
||||
public string? SpecialInstructions { get; set; }
|
||||
|
||||
[Name("Notes")]
|
||||
public string? Notes { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user