namespace IceImportDAL.DTO.IceImportRun; // Mirrors ICEIMPORT.TICEIMPORTRUN exactly (see DB/Migrations/20260708_IceImport_Phase0_Schema.sql). // Status values are constrained by CK_TICEIMPORTRUN_STATUS: Queued | Running | Success | Failed | Cancelled // (no PartialFailure — see IceImportRunBLL's design note on how partial-failure outcomes map to 'Failed'). public class IceImportRunDTO { public long RunId { get; set; } public int IceMapId { get; set; } public string Status { get; set; } = "Queued"; public string? TriggeredBy { get; set; } public long? SourceFileArtifactId { get; set; } public int? SourceProfileId { get; set; } public string? CurrentStage { get; set; } public int RowTotalCount { get; set; } public int SuccessCount { get; set; } public int FailedCount { get; set; } public DateTime? StartedOn { get; set; } public DateTime? CompletedOn { get; set; } public string? ErrorMessage { get; set; } public long? RetryOfRunId { get; set; } public int TenantId { get; set; } public int? CreatedById { get; set; } public DateTime CreatedOn { get; set; } } // Lighter projection for GetImportRunHistory — omits fields the history grid never displays // (SourceFileArtifactId, SourceProfileId, ErrorMessage, TenantId, CreatedById). public class IceImportRunListItemDTO { public long RunId { get; set; } public int IceMapId { get; set; } public string Status { get; set; } = string.Empty; public string? TriggeredBy { get; set; } public string? CurrentStage { get; set; } public int RowTotalCount { get; set; } public int SuccessCount { get; set; } public int FailedCount { get; set; } public DateTime? StartedOn { get; set; } public DateTime? CompletedOn { get; set; } public long? RetryOfRunId { get; set; } public DateTime CreatedOn { get; set; } }