using System.ComponentModel.DataAnnotations; using LittleShop.Enums; namespace LittleShop.DTOs; public class ProductImportDto { [Required] public string Name { get; set; } = string.Empty; public string Description { get; set; } = string.Empty; [Required] public decimal Price { get; set; } [Required] public decimal Weight { get; set; } public string WeightUnit { get; set; } = "Grams"; // Will be parsed to enum public int StockQuantity { get; set; } = 0; [Required] public string CategoryName { get; set; } = string.Empty; // Will be resolved to CategoryId public bool IsActive { get; set; } = true; // Product variations - semicolon separated format: "Name:Quantity:Price;Name:Quantity:Price" public string? Variations { get; set; } // Photo URLs - semicolon separated public string? PhotoUrls { get; set; } } public class ProductImportResultDto { public int TotalRows { get; set; } public int SuccessfulImports { get; set; } public int FailedImports { get; set; } public List Errors { get; set; } = new(); public List ImportedProducts { get; set; } = new(); } public class ProductImportErrorDto { public int RowNumber { get; set; } public string ProductName { get; set; } = string.Empty; public List ErrorMessages { get; set; } = new(); } public class ProductVariationImportDto { public string Name { get; set; } = string.Empty; public int Quantity { get; set; } public decimal Price { get; set; } public int SortOrder { get; set; } }