| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | using System.Reflection; |
| | | 4 | | |
| | | 5 | | namespace OzonDomains.Models |
| | | 6 | | { |
| | | 7 | | public class Supplier |
| | | 8 | | { |
| | 261 | 9 | | public int Id { get; set; } |
| | | 10 | | |
| | | 11 | | [StringLength(50)] |
| | | 12 | | [Display(Name = "Поставщик")] |
| | 426 | 13 | | public string? Name { get; set; } |
| | | 14 | | |
| | | 15 | | [Display(Name = "Коэффицент себестоимости")] |
| | 515 | 16 | | public decimal? CostFactor { get; set; } = 1; |
| | | 17 | | |
| | 503 | 18 | | [Display(Name = "Стоимость за кг")] public decimal? WeightFactor { get; set; } = 1; |
| | | 19 | | |
| | 248 | 20 | | [Display(Name = "Валюта")] public CurrencyCode CurrencyCode { get; set; } |
| | | 21 | | |
| | | 22 | | [Display(Name = "Валюта стоимость за кг")] |
| | 103 | 23 | | public CurrencyCode WeightFactorCurrencyCode { get; set; } |
| | | 24 | | |
| | | 25 | | [NotMapped] |
| | | 26 | | public string WeightFactorCurrencyDisplayName |
| | | 27 | | { |
| | | 28 | | get |
| | | 29 | | { |
| | 0 | 30 | | var field = WeightFactorCurrencyCode.GetType().GetField(WeightFactorCurrencyCode.ToString()); |
| | 0 | 31 | | var displayAttribute = field?.GetCustomAttribute<DisplayAttribute>(); |
| | 0 | 32 | | return displayAttribute?.Name ?? WeightFactorCurrencyCode.ToString(); |
| | | 33 | | } |
| | | 34 | | } |
| | | 35 | | |
| | | 36 | | [StringLength(500)] |
| | | 37 | | [Display(Name = "CSV URL")] |
| | 96 | 38 | | public string? CsvUrl { get; set; } |
| | | 39 | | |
| | | 40 | | [StringLength(500)] |
| | | 41 | | [Display(Name = "Сайт")] |
| | 127 | 42 | | public string? Site { get; set; } |
| | | 43 | | |
| | | 44 | | [Display(Name = "Дополнительный срок")] |
| | 137 | 45 | | public int? AdditionalTerm { get; set; } |
| | | 46 | | |
| | | 47 | | [Display(Name = "Норматив поставки, ч.")] |
| | 12 | 48 | | public int? ExpectedDeliveryHours { get; set; } |
| | | 49 | | |
| | 106 | 50 | | [Display(Name = "Облагается НДС")] public bool IsVatApplicable { get; set; } = false; |
| | | 51 | | |
| | | 52 | | [MaxLength(20)] |
| | | 53 | | [Display(Name = "ИНН")] |
| | 125 | 54 | | public string? INNCode { get; set; } |
| | | 55 | | |
| | 5 | 56 | | [Display(Name = "Реализатор")] public bool IsReSeller { get; set; } = false; |
| | | 57 | | } |
| | | 58 | | } |