46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
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,
|
|
|
|
[Display(Description = "Парсинг данных домов")]
|
|
ParseHousesData_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<Registry> Registries { get; set; } = [];
|
|
|
|
public virtual ICollection<House> Houses { get; set; } = [];
|
|
|
|
[NotMapped]
|
|
public bool Completed => EndedAt.HasValue;
|
|
}
|
|
}
|