| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | using OzonDomains.Models.Authorization; |
| | | 4 | | |
| | | 5 | | namespace OzonDomains.Models; |
| | | 6 | | |
| | | 7 | | [Table("OrderControlTasks")] |
| | | 8 | | public class OrderControlTask |
| | | 9 | | { |
| | 622 | 10 | | public long Id { get; set; } |
| | 328 | 11 | | public int RuleId { get; set; } |
| | 653 | 12 | | public OrderControlRule? Rule { get; set; } |
| | 331 | 13 | | public int OrderId { get; set; } |
| | 980 | 14 | | public Order? Order { get; set; } |
| | 663 | 15 | | [Required, MaxLength(160)] public string DeduplicationKey { get; set; } = string.Empty; |
| | 1287 | 16 | | [Required, MaxLength(30)] public string Status { get; set; } = OrderControlTaskStatus.Open; |
| | 305 | 17 | | public int Priority { get; set; } |
| | 633 | 18 | | public int TargetAppRoleId { get; set; } |
| | 0 | 19 | | public AppRole? TargetAppRole { get; set; } |
| | 1 | 20 | | [MaxLength(450)] public string? ClaimedByUserId { get; set; } |
| | 0 | 21 | | public DateTime? ClaimedAtUtc { get; set; } |
| | 328 | 22 | | public DateTime WarningAtUtc { get; set; } |
| | 654 | 23 | | public DateTime DueAtUtc { get; set; } |
| | 0 | 24 | | public DateTime? EscalatedAtUtc { get; set; } |
| | 3 | 25 | | public DateTime? ClosedAtUtc { get; set; } |
| | 2 | 26 | | [MaxLength(450)] public string? ClosedByUserId { get; set; } |
| | 4 | 27 | | [MaxLength(500)] public string? CloseReason { get; set; } |
| | 305 | 28 | | public string? SnapshotJson { get; set; } |
| | 662 | 29 | | public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow; |
| | 664 | 30 | | public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow; |
| | | 31 | | } |
| | | 32 | | |
| | | 33 | | public static class OrderControlTaskStatus |
| | | 34 | | { |
| | | 35 | | public const string Open = "Open"; |
| | | 36 | | public const string InProgress = "InProgress"; |
| | | 37 | | public const string Completed = "Completed"; |
| | | 38 | | public const string Closed = "Closed"; |
| | | 39 | | public const string Overdue = "Overdue"; |
| | | 40 | | public const string Removed = "Removed"; |
| | | 41 | | public static readonly string[] Active = [Open, InProgress, Overdue]; |
| | | 42 | | } |