| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace OzonDomains.Models; |
| | | 5 | | |
| | | 6 | | [Table("MotexCartItems")] |
| | | 7 | | public sealed class MotexCartItem |
| | | 8 | | { |
| | 46 | 9 | | public long Id { get; set; } |
| | 70 | 10 | | public int StudioOrderId { get; set; } |
| | 52 | 11 | | public int? ActiveStudioOrderId { get; set; } |
| | 4 | 12 | | public Order? StudioOrder { get; set; } |
| | 106 | 13 | | [Required, MaxLength(120)] public string Code { get; set; } = string.Empty; |
| | 104 | 14 | | [Required, MaxLength(256)] public string Brand { get; set; } = string.Empty; |
| | 9 | 15 | | [MaxLength(200)] public string? ProductName { get; set; } |
| | 24 | 16 | | [MaxLength(40)] public string? StoreCode { get; set; } |
| | 9 | 17 | | [MaxLength(255)] public string? StoreInfo { get; set; } |
| | 45 | 18 | | public decimal Quantity { get; set; } |
| | 21 | 19 | | public decimal? SourcePrice { get; set; } |
| | 62 | 20 | | [Required, MaxLength(8)] public string CurrencyCode { get; set; } = "BYN"; |
| | 11 | 21 | | public DateTime? DeliveryAtUtc { get; set; } |
| | 111 | 22 | | [Required, MaxLength(30)] public string Status { get; set; } = MotexCartItemStatus.Pending; |
| | 12 | 23 | | [MaxLength(1000)] public string? LastError { get; set; } |
| | 9 | 24 | | [MaxLength(450)] public string? CreatedBy { get; set; } |
| | 43 | 25 | | public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow; |
| | 54 | 26 | | public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow; |
| | | 27 | | } |
| | | 28 | | |
| | | 29 | | public static class MotexCartItemStatus |
| | | 30 | | { |
| | | 31 | | public const string Pending = "Pending"; |
| | | 32 | | public const string Processing = "Processing"; |
| | | 33 | | public const string Ordered = "Ordered"; |
| | | 34 | | public const string Failed = "Failed"; |
| | | 35 | | public const string Removed = "Removed"; |
| | | 36 | | public static readonly string[] Active = [Pending, Processing, Failed]; |
| | | 37 | | } |