| | | 1 | | using System; |
| | | 2 | | using System.Collections.Generic; |
| | | 3 | | using System.ComponentModel.DataAnnotations; |
| | | 4 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 5 | | using System.Text.Json; |
| | | 6 | | |
| | | 7 | | namespace OzonDomains.Models |
| | | 8 | | { |
| | | 9 | | public class ColumnMapping |
| | | 10 | | { |
| | 210 | 11 | | public int Id { get; set; } |
| | | 12 | | |
| | | 13 | | [MaxLength(50)] |
| | 282 | 14 | | public string MappingName { get; set; } = null!; |
| | | 15 | | |
| | 155 | 16 | | public int? SelectedClientId { get; set; } |
| | 3 | 17 | | public virtual OzonClient? SelectedClient { get; set; } = null; |
| | | 18 | | |
| | 155 | 19 | | public string? SelectedStatus { get; set; } |
| | | 20 | | |
| | 155 | 21 | | public int? SelectedManufacturerId { get; set; } |
| | 3 | 22 | | public virtual Manufacturer? SelectedManufacturer { get; set; } = null; |
| | | 23 | | |
| | 155 | 24 | | public int? SelectedWarehouseId { get; set; } |
| | 3 | 25 | | public virtual Warehouse? SelectedWarehouse { get; set; } = null; |
| | | 26 | | |
| | 155 | 27 | | public int? SelectedSupplierId { get; set; } |
| | 3 | 28 | | public virtual Supplier? SelectedSupplier { get; set; } = null; |
| | | 29 | | |
| | 155 | 30 | | public CurrencyCode? SelectedCurrencyCode { get; set; } |
| | | 31 | | |
| | | 32 | | [NotMapped] |
| | 330 | 33 | | public Dictionary<string, string> ColumnMappings { get; set; } = new(); |
| | | 34 | | |
| | | 35 | | public string ColumnMappingsSerialized |
| | | 36 | | { |
| | 1 | 37 | | get => JsonSerializer.Serialize(ColumnMappings); |
| | 2 | 38 | | set => ColumnMappings = JsonSerializer.Deserialize<Dictionary<string, string>>(value) ?? new(); |
| | | 39 | | } |
| | | 40 | | |
| | 155 | 41 | | public bool ManufacturerFromArticle { get; set; } = false; |
| | | 42 | | |
| | | 43 | | } |
| | | 44 | | |
| | | 45 | | } |