57 lines
1.4 KiB
C#
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;
|
|
}
|
|
}
|
|
} |