| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 3 | | |
| | | 4 | | namespace OzonDomains.Models; |
| | | 5 | | |
| | | 6 | | [Table("BackgroundJobSteps")] |
| | | 7 | | public class BackgroundJobStep |
| | | 8 | | { |
| | | 9 | | [Key] |
| | | 10 | | [DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
| | 6 | 11 | | public long Id { get; set; } |
| | | 12 | | |
| | 0 | 13 | | public long ExecutionId { get; set; } |
| | | 14 | | |
| | 8 | 15 | | public int StepNumber { get; set; } |
| | | 16 | | |
| | | 17 | | [Required] |
| | | 18 | | [MaxLength(200)] |
| | 12 | 19 | | public string StepName { get; set; } = string.Empty; |
| | | 20 | | |
| | | 21 | | [Required] |
| | | 22 | | [MaxLength(50)] |
| | 7 | 23 | | public string Status { get; set; } = string.Empty; |
| | | 24 | | |
| | 7 | 25 | | public DateTime StartedAt { get; set; } = DateTime.UtcNow; |
| | | 26 | | |
| | 3 | 27 | | public DateTime? CompletedAt { get; set; } |
| | | 28 | | |
| | 3 | 29 | | public long? DurationMs { get; set; } |
| | | 30 | | |
| | | 31 | | [Column(TypeName = "json")] |
| | 4 | 32 | | public string? InputData { get; set; } |
| | | 33 | | |
| | | 34 | | [Column(TypeName = "json")] |
| | 4 | 35 | | public string? OutputData { get; set; } |
| | | 36 | | |
| | 3 | 37 | | public string? ErrorMessage { get; set; } |
| | | 38 | | |
| | | 39 | | [ForeignKey(nameof(ExecutionId))] |
| | 0 | 40 | | public virtual BackgroundJobExecution Execution { get; set; } = null!; |
| | | 41 | | } |