| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace OzonDomains.Models; |
| | | 5 | | |
| | | 6 | | [Table("ShateMCartItems")] |
| | | 7 | | public sealed class ShateMCartItem |
| | | 8 | | { |
| | | 9 | | public long Id { get; set; } |
| | | 10 | | public int StudioOrderId { get; set; } |
| | | 11 | | public int? ActiveStudioOrderId { get; set; } |
| | | 12 | | public Order? StudioOrder { get; set; } |
| | | 13 | | [Required, MaxLength(512)] public string PriceId { get; set; } = string.Empty; |
| | | 14 | | [MaxLength(120)] public string Article { get; set; } = string.Empty; |
| | | 15 | | [MaxLength(256)] public string Brand { get; set; } = string.Empty; |
| | | 16 | | [MaxLength(200)] public string? ProductName { get; set; } |
| | | 17 | | [MaxLength(80)] public string? LocationCode { get; set; } |
| | | 18 | | [MaxLength(120)] public string? Direction { get; set; } |
| | | 19 | | [MaxLength(80)] public string? AgreementCode { get; set; } |
| | | 20 | | [MaxLength(80)] public string? DeliveryAddressCode { get; set; } |
| | | 21 | | [MaxLength(40)] public string? DeliveryType { get; set; } |
| | | 22 | | public DateTime? DeliveryAtUtc { get; set; } |
| | | 23 | | [MaxLength(120)] public string? ExternalBasketItemId { get; set; } |
| | | 24 | | public decimal Quantity { get; set; } |
| | | 25 | | public decimal? SourcePrice { get; set; } |
| | | 26 | | [Required, MaxLength(8)] public string CurrencyCode { get; set; } = "BYN"; |
| | | 27 | | [Required, MaxLength(30)] public string Status { get; set; } = ShateMCartItemStatus.Pending; |
| | | 28 | | [MaxLength(1000)] public string? LastError { get; set; } |
| | | 29 | | [MaxLength(450)] public string? CreatedBy { get; set; } |
| | | 30 | | public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow; |
| | | 31 | | public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow; |
| | | 32 | | } |
| | | 33 | | |
| | | 34 | | public static class ShateMCartItemStatus |
| | | 35 | | { |
| | | 36 | | public const string Pending = "Pending"; |
| | | 37 | | public const string Ordered = "Ordered"; |
| | | 38 | | public const string Failed = "Failed"; |
| | | 39 | | public const string Removed = "Removed"; |
| | 1 | 40 | | public static readonly string[] Active = [Pending, Failed]; |
| | | 41 | | } |