| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace OzonDomains.Models; |
| | | 5 | | |
| | | 6 | | /// <summary>Заказ, созданный в Профит-Лиге. Один вызов POST /cart/order может создать несколько |
| | | 7 | | /// заказов — поставщик разбивает корзину по складам, и на каждый номер заводится своя строка.</summary> |
| | | 8 | | [Table("ProfitLigaOrders")] |
| | | 9 | | public sealed class ProfitLigaOrder |
| | | 10 | | { |
| | 10 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | 57 | 13 | | [Required, MaxLength(50)] public string OrderNumber { get; set; } = string.Empty; |
| | | 14 | | |
| | 9 | 15 | | [MaxLength(120)] public string? PointCode { get; set; } |
| | 8 | 16 | | [MaxLength(300)] public string? PointName { get; set; } |
| | 8 | 17 | | [MaxLength(20)] public string? DeliveryMethodId { get; set; } |
| | 8 | 18 | | [MaxLength(100)] public string? DeliveryMethodName { get; set; } |
| | 8 | 19 | | [MaxLength(20)] public string? PaymentId { get; set; } |
| | 8 | 20 | | [MaxLength(100)] public string? PaymentName { get; set; } |
| | | 21 | | |
| | 66 | 22 | | [Required, MaxLength(50)] public string Status { get; set; } = "Создан"; |
| | | 23 | | |
| | 8 | 24 | | [MaxLength(450)] public string? CreatedBy { get; set; } |
| | 0 | 25 | | public string? RequestJson { get; set; } |
| | 8 | 26 | | public string? ResponseJson { get; set; } |
| | 24 | 27 | | public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow; |
| | | 28 | | |
| | 54 | 29 | | public ICollection<ProfitLigaOrderItem> Items { get; set; } = new List<ProfitLigaOrderItem>(); |
| | | 30 | | } |
| | | 31 | | |
| | | 32 | | [Table("ProfitLigaOrderItems")] |
| | | 33 | | public sealed class ProfitLigaOrderItem |
| | | 34 | | { |
| | | 35 | | public long Id { get; set; } |
| | | 36 | | |
| | | 37 | | public long ProfitLigaOrderId { get; set; } |
| | | 38 | | public ProfitLigaOrder ProfitLigaOrder { get; set; } = null!; |
| | | 39 | | |
| | | 40 | | public long? ProfitLigaCartItemId { get; set; } |
| | | 41 | | public ProfitLigaCartItem? ProfitLigaCartItem { get; set; } |
| | | 42 | | |
| | | 43 | | public int StudioOrderId { get; set; } |
| | | 44 | | |
| | | 45 | | [Required, MaxLength(60)] public string Article { get; set; } = string.Empty; |
| | | 46 | | [Required, MaxLength(100)] public string Brand { get; set; } = string.Empty; |
| | | 47 | | [MaxLength(40)] public string? ArticleId { get; set; } |
| | | 48 | | [MaxLength(120)] public string? ProductCode { get; set; } |
| | | 49 | | |
| | | 50 | | public decimal Quantity { get; set; } |
| | | 51 | | public decimal? Price { get; set; } |
| | | 52 | | [MaxLength(8)] public string? CurrencyCode { get; set; } |
| | | 53 | | |
| | | 54 | | /// <summary>id позиции в заказе поставщика — приходит из GET /orders/list.</summary> |
| | | 55 | | [MaxLength(50)] public string? ExternalLineId { get; set; } |
| | | 56 | | |
| | | 57 | | [MaxLength(1000)] public string? Error { get; set; } |
| | | 58 | | } |