| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace OzonDomains.Models; |
| | | 5 | | |
| | | 6 | | [Table("BackgroundTransactionResults")] |
| | | 7 | | public class BackgroundTransactionResult |
| | | 8 | | { |
| | | 9 | | [Key] |
| | | 10 | | [DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
| | 8 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | 0 | 13 | | public long ExecutionId { get; set; } |
| | | 14 | | |
| | 0 | 15 | | public long? StepId { get; set; } |
| | | 16 | | |
| | 0 | 17 | | public long? OrderMatchId { get; set; } |
| | | 18 | | |
| | 9 | 19 | | public int OrderId { get; set; } |
| | | 20 | | |
| | | 21 | | [MaxLength(200)] |
| | 5 | 22 | | public string? WarehouseName { get; set; } |
| | | 23 | | |
| | 5 | 24 | | public int? TransactionId { get; set; } |
| | | 25 | | |
| | | 26 | | [MaxLength(100)] |
| | 10 | 27 | | public string? OneCDocumentId { get; set; } |
| | | 28 | | |
| | | 29 | | [MaxLength(100)] |
| | 9 | 30 | | public string? OneCDocumentNumber { get; set; } |
| | | 31 | | |
| | | 32 | | /// <summary>Документ проведён в 1С (OData Posted=true).</summary> |
| | 17 | 33 | | public bool IsPosted { get; set; } |
| | | 34 | | |
| | | 35 | | [Required] |
| | | 36 | | [MaxLength(50)] |
| | 21 | 37 | | public string Status { get; set; } = string.Empty; |
| | | 38 | | |
| | 10 | 39 | | public string? ErrorMessage { get; set; } |
| | | 40 | | |
| | 9 | 41 | | public bool IsAutomated { get; set; } = true; |
| | | 42 | | |
| | | 43 | | [MaxLength(1000)] |
| | 5 | 44 | | public string? Comment { get; set; } |
| | | 45 | | |
| | 13 | 46 | | public DateTime CreatedAt { get; set; } = DateTime.UtcNow; |
| | | 47 | | |
| | | 48 | | [ForeignKey(nameof(ExecutionId))] |
| | 0 | 49 | | public virtual BackgroundJobExecution Execution { get; set; } = null!; |
| | | 50 | | |
| | | 51 | | [ForeignKey(nameof(StepId))] |
| | 0 | 52 | | public virtual BackgroundJobStep? Step { get; set; } |
| | | 53 | | |
| | | 54 | | [ForeignKey(nameof(OrderMatchId))] |
| | 0 | 55 | | public virtual BackgroundOrderMatch? OrderMatch { get; set; } |
| | | 56 | | |
| | | 57 | | [ForeignKey(nameof(OrderId))] |
| | 5 | 58 | | public virtual Order Order { get; set; } = null!; |
| | | 59 | | |
| | | 60 | | [ForeignKey(nameof(TransactionId))] |
| | 0 | 61 | | public virtual Transaction? Transaction { get; set; } |
| | | 62 | | } |