| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace OzonDomains.Models; |
| | | 5 | | |
| | | 6 | | [Table("MikadoCartItems")] |
| | | 7 | | public sealed class MikadoCartItem |
| | | 8 | | { |
| | 15 | 9 | | public long Id { get; set; } |
| | 16 | 10 | | public int StudioOrderId { get; set; } |
| | 16 | 11 | | public int? ActiveStudioOrderId { get; set; } |
| | 0 | 12 | | public Order? StudioOrder { get; set; } |
| | 22 | 13 | | [Required, MaxLength(80)] public string OrderCode { get; set; } = string.Empty; |
| | 12 | 14 | | public int StockId { get; set; } |
| | 30 | 15 | | public long ApiBasketItemId { get; set; } |
| | 25 | 16 | | [Required, MaxLength(80)] public string Article { get; set; } = string.Empty; |
| | 22 | 17 | | [Required, MaxLength(120)] public string Brand { get; set; } = string.Empty; |
| | 5 | 18 | | [MaxLength(255)] public string? ProductName { get; set; } |
| | 5 | 19 | | [MaxLength(160)] public string? WarehouseName { get; set; } |
| | 13 | 20 | | public int Quantity { get; set; } |
| | 11 | 21 | | public int MinimumQuantity { get; set; } |
| | 6 | 22 | | public decimal? SourcePrice { get; set; } |
| | 5 | 23 | | public int DeliveryDays { get; set; } |
| | 5 | 24 | | public int DeliveryType { get; set; } |
| | 5 | 25 | | public int ExpressId { get; set; } |
| | 26 | 26 | | [Required, MaxLength(20)] public string Status { get; set; } = MikadoCartItemStatus.Pending; |
| | 3 | 27 | | [MaxLength(1000)] public string? LastError { get; set; } |
| | 1 | 28 | | public DateTime? TestedAtUtc { get; set; } |
| | 5 | 29 | | [MaxLength(450)] public string? CreatedBy { get; set; } |
| | 10 | 30 | | public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow; |
| | 13 | 31 | | public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow; |
| | | 32 | | } |
| | | 33 | | |
| | | 34 | | public static class MikadoCartItemStatus |
| | | 35 | | { |
| | | 36 | | public const string Pending = "Pending"; |
| | | 37 | | public const string Ready = "Ready"; |
| | | 38 | | public const string Failed = "Failed"; |
| | | 39 | | public const string Removed = "Removed"; |
| | | 40 | | public static readonly string[] Active = [Pending, Ready, Failed]; |
| | | 41 | | } |