using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Hcs.WebApp.Data.Hcs { public class Operation { public enum OperationType { [Display(Description = "Экспорт общего справочника")] NsiCommon_ExportNsiItem_15_7_0_1, [Display(Description = "Экспорт частного справочника")] Nsi_ExportNsiItem_15_7_0_1 } public int Id { get; set; } public int CampaignId { get; set; } public virtual Campaign Campaign { get; set; } = null!; public OperationType Type { get; set; } public DateTime CreatedAt { get; set; } public DateTime? StartedAt { get; set; } public DateTime? EndedAt { get; set; } public string? MessageGuid { get; set; } public string? FailureReason { get; set; } public virtual ICollection Registries { get; set; } = []; public virtual ICollection Houses { get; set; } = []; [NotMapped] public bool Completed => EndedAt.HasValue; } }