| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace OzonDomains.Models; |
| | | 5 | | |
| | | 6 | | /// <summary>Отдельное условие акции, входящее в снимок промо товара.</summary> |
| | | 7 | | public sealed class OrderOzonPromotionCondition |
| | | 8 | | { |
| | 0 | 9 | | public int Id { get; set; } |
| | 0 | 10 | | public int SnapshotId { get; set; } |
| | | 11 | | |
| | 0 | 12 | | [MaxLength(32)] public string SourceType { get; set; } = OzonPromotionSourceType.Ozon; |
| | 0 | 13 | | public long? ExternalActionId { get; set; } |
| | 0 | 14 | | [MaxLength(500)] public string Title { get; set; } = string.Empty; |
| | 0 | 15 | | [MaxLength(100)] public string? Mechanic { get; set; } |
| | 0 | 16 | | [Column(TypeName = "longtext")] public string? Description { get; set; } |
| | 0 | 17 | | [Column(TypeName = "decimal(18,2)")] public decimal? Value { get; set; } |
| | 0 | 18 | | [Column(TypeName = "decimal(18,2)")] public decimal? ActionPrice { get; set; } |
| | 0 | 19 | | public DateTime? DateFrom { get; set; } |
| | 0 | 20 | | public DateTime? DateTo { get; set; } |
| | 0 | 21 | | [MaxLength(32)] public string? AddMode { get; set; } |
| | | 22 | | |
| | 0 | 23 | | public OrderOzonPromotionSnapshot Snapshot { get; set; } = null!; |
| | | 24 | | } |
| | | 25 | | |
| | | 26 | | public static class OzonPromotionSourceType |
| | | 27 | | { |
| | | 28 | | public const string Ozon = "Ozon"; |
| | | 29 | | public const string HotSale = "HotSale"; |
| | | 30 | | public const string SellerAction = "SellerAction"; |
| | | 31 | | } |