Files
2026-03-25 14:50:13 -05:00

57 lines
1.4 KiB
C#

using System;
using System.ComponentModel.DataAnnotations.Schema;
using LCU.Library.Internal.DocumentIngestorModels.Enums;
namespace LCU.Library.Internal.DocumentIngestorModels.Entities;
public class PdfPartitionerRunInfo
{
public PdfPartitionerRunInfo()
{
}
public PdfPartitionerRunInfo(DateTime startTimeStamp, PdfParserTypes pdfParserType, string path, int indexTotal)
{
PdfPartitionerRunInfoId = Guid.NewGuid();
StartTimeStamp = startTimeStamp;
PdfParserType = pdfParserType;
Path = path;
IndexTotal = indexTotal;
}
public Guid PdfPartitionerRunInfoId { get; set; }
public DateTime StartTimeStamp { get; set; }
public DateTime? EndTimeStamp { get; set; }
public PdfParserTypes PdfParserType { get; set; }
public string Path { get; set; }
public int IndexTotal { get; set; }
public int FailureCount { get; set; }
public int SuccessCount { get; set; }
[NotMapped]
public int FailureAndSuccessCount
{
get
{
return FailureCount + SuccessCount;
}
}
[NotMapped]
public bool PdfPartitionerCompleted
{
get
{
return IndexTotal == FailureAndSuccessCount;
}
}
[NotMapped]
public bool WasSuccessful
{
get
{
return FailureCount == 0;
}
}
}