Files
PowderCoatingLogix/src/PowderCoating.Application/DTOs/Import/CustomerImportDto.cs
T
spouliot 82fb48f7a5 Patch export/import for missing fields; add CustomerContacts export
- DataExportController + AccountDataExportController: add ProjectName to
  Jobs, Quotes, Invoices (XLSX + CSV); add LeadSource + ShipTo fields to
  Customers (XLSX + CSV); add CustomerContacts sheet/CSV (new)
- Both export views: add Customer Contacts checkbox (checked by default)
- CustomerImportDto: add LeadSource + ShipTo* fields
- JobImportDto: add ProjectName
- QuoteImportDto: add ProjectName
- InvoiceImportDto: add Project Name (dual-name alias for round-trip)
- CsvImportService: wire all new import fields to entity creation;
  also patch invoice update path for ProjectName
- Add scripts/purge_imported_data.sql (dry-run T-SQL for data cleanup)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 15:14:27 -04:00

85 lines
1.9 KiB
C#

using CsvHelper.Configuration.Attributes;
namespace PowderCoating.Application.DTOs.Import;
/// <summary>
/// DTO for importing customers from CSV files.
/// </summary>
public class CustomerImportDto
{
[Name("CompanyName")]
public string CompanyName { get; set; } = string.Empty;
[Name("ContactFirstName")]
public string? ContactFirstName { get; set; }
[Name("ContactLastName")]
public string? ContactLastName { get; set; }
[Name("Email")]
public string? Email { get; set; }
[Name("Phone")]
public string? Phone { get; set; }
[Name("MobilePhone")]
public string? MobilePhone { get; set; }
[Name("Address")]
public string? Address { get; set; }
[Name("City")]
public string? City { get; set; }
[Name("State")]
public string? State { get; set; }
[Name("ZipCode")]
public string? ZipCode { get; set; }
[Name("Country")]
public string? Country { get; set; }
[Name("CustomerType")]
public string? CustomerType { get; set; }
[Name("PricingTierCode")]
public string? PricingTierCode { get; set; }
[Name("CreditLimit")]
public decimal? CreditLimit { get; set; }
[Name("PaymentTerms")]
public string? PaymentTerms { get; set; }
[Name("TaxExempt")]
public bool? TaxExempt { get; set; }
[Name("TaxId")]
public string? TaxId { get; set; }
[Name("IsActive")]
public bool? IsActive { get; set; }
[Name("Notes")]
public string? Notes { get; set; }
[Name("LeadSource")]
public string? LeadSource { get; set; }
[Name("ShipToAddress")]
public string? ShipToAddress { get; set; }
[Name("ShipToCity")]
public string? ShipToCity { get; set; }
[Name("ShipToState")]
public string? ShipToState { get; set; }
[Name("ShipToZipCode")]
public string? ShipToZipCode { get; set; }
[Name("ShipToCountry")]
public string? ShipToCountry { get; set; }
}