Adding
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
namespace LCU.Library.Internal.DocumentIngestorModels.Entities;
|
||||
public class DocumentCodeDetailInfo
|
||||
{
|
||||
public string DocumentType { get; set; }
|
||||
public string DocumentBusinessName { get; set; }
|
||||
public string DocumentMemberFacingName { get; set; }
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using LCU.Library.Internal.DocumentIngestorModels.Enums;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentIngestorModels.Entities
|
||||
{
|
||||
public class DocumentProcessingInfo
|
||||
{
|
||||
public DocumentProcessingInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public DocumentProcessingInfo(Guid ingestorRunInfoId,
|
||||
DateTime createdDate,
|
||||
string documentValuePayload,
|
||||
ProcessStatusTypes statusType,
|
||||
string documentFileName,
|
||||
string documentType,
|
||||
string documentBusinessName,
|
||||
bool entityUnknown = false)
|
||||
{
|
||||
IngestorRunInfoId = ingestorRunInfoId;
|
||||
CreatedDate = createdDate;
|
||||
DocumentValuePayload = documentValuePayload;
|
||||
StatusType = statusType;
|
||||
DocumentFileName = documentFileName;
|
||||
ProcessCount = 0;
|
||||
DocumentType = documentType;
|
||||
DocumentBusinessName = documentBusinessName;
|
||||
EntityUnknown = entityUnknown;
|
||||
}
|
||||
|
||||
public int DocumentProcessingInfoId { get; set; }
|
||||
public Guid? DocumentId { get; set; }
|
||||
public Guid IngestorRunInfoId { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public string DocumentValuePayload { get; set; }
|
||||
public ProcessStatusTypes StatusType { get; set; }
|
||||
public string DocumentFileName { get; set; }
|
||||
public int ProcessCount { get; set; }
|
||||
public string DocumentType { get; set; }
|
||||
public string DocumentBusinessName { get; set; }
|
||||
public bool EntityUnknown { get; set; }
|
||||
|
||||
[ForeignKey("IngestorRunInfoId")]
|
||||
public IngestorRunInfo IngestorRunInfo { get; set; }
|
||||
|
||||
[ForeignKey("DocumentProcessingInfoId")]
|
||||
public ICollection<ProcessingLog> ProcessingLogs { get; set; }
|
||||
|
||||
[ForeignKey("DocumentProcessingInfoId")]
|
||||
public ICollection<MemberNotificationInfo>? MemberNotificationInfos { get; set; }
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace LCU.Library.Internal.DocumentIngestorModels.Entities;
|
||||
|
||||
public class DocumentTypeArchiveDeleteInfo
|
||||
{
|
||||
[Required]
|
||||
public string DocumentTypeName { get; set; }
|
||||
[Required]
|
||||
[Range(0, int.MaxValue, ErrorMessage = "Please enter a value larger than {1}")]
|
||||
public int ArchiveDays { get; set; }
|
||||
[Required]
|
||||
[Range(1, int.MaxValue, ErrorMessage = "Please enter a value larger than {1}")]
|
||||
public int ArchiveMonths { get; set; }
|
||||
public int? DeleteDays { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateTime ArchiveDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return DateTime.Now.AddMonths(ArchiveMonths).AddDays(ArchiveDays);
|
||||
}
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
using LCU.Library.Internal.DocumentIngestorModels.Enums;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentIngestorModels.Entities
|
||||
{
|
||||
public class IngestorRunInfo
|
||||
{
|
||||
public IngestorRunInfo()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public IngestorRunInfo(Guid ingestorRunInfoId,
|
||||
DateTime startTimeStamp,
|
||||
IngestorTypes ingestorType,
|
||||
string filePath,
|
||||
string indexFileName,
|
||||
int indexTotal,
|
||||
int ingestionRunCount = 0)
|
||||
{
|
||||
IngestorRunInfoId = ingestorRunInfoId;
|
||||
StartTimeStamp = startTimeStamp;
|
||||
IngestorType = ingestorType;
|
||||
IndexFileName = indexFileName;
|
||||
IndexFilePath = filePath;
|
||||
IndexTotal = indexTotal;
|
||||
IngestionRunCount = ingestionRunCount;
|
||||
}
|
||||
|
||||
public Guid IngestorRunInfoId { get; set; }
|
||||
public DateTime StartTimeStamp { get; set; }
|
||||
public DateTime? EndTimeStamp { get; set; }
|
||||
public IngestorTypes IngestorType { get; set; }
|
||||
public string IndexFilePath { get; set; }
|
||||
public string IndexFileName { get; set; }
|
||||
public int IndexTotal { get; set; }
|
||||
public DateTime? ArchiveTimeStamp { get; set; }
|
||||
public int IngestionRunCount { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using LCU.Library.Internal.DocumentIngestorModels.Enums;
|
||||
namespace LCU.Library.Internal.DocumentIngestorModels.Entities;
|
||||
|
||||
public class MemberNotificationInfo
|
||||
{
|
||||
public int MemberNotificationInfoId { get; set; }
|
||||
public int DocumentProcessingInfoId { get; set; }
|
||||
public DateTime UploadDate { get; set;}
|
||||
public DeliveryMethod DeliveryMethod { get; set; }
|
||||
public DateTime? SentTimeStamp { get; set; }
|
||||
public DateTime? ResponseTimeStamp { get; set; }
|
||||
public string AgreeUserId { get; set; }
|
||||
public string EntityName { get; set; }
|
||||
public string EmailAddress { get; set; }
|
||||
public NotificationStatusTypes NotificationStatusType { get; set; }
|
||||
public int Attempts { get; set; }
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
namespace LCU.Library.Internal.DocumentIngestorModels.Entities;
|
||||
|
||||
public class OsgPreprocessorInfo
|
||||
{
|
||||
public int OsgPreprocessorInfoId { get; set; }
|
||||
public Guid BatchRunInfoId { get; set; }
|
||||
public DateTime ZipFileStartTime { get; set; }
|
||||
public DateTime ZipFileEndTime { get; set; }
|
||||
public string ZipFileName { get; set; }
|
||||
public string DocumentType { get; set; }
|
||||
public string EntityName { get; set; }
|
||||
public string MemberNumber { get; set; }
|
||||
public DateTime CreatedDate { get; set;}
|
||||
public int StartingPage { get; set; }
|
||||
public int NumberOfPages { get; set; }
|
||||
public string XmlOutput { get; set; }
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
using LCU.Library.Internal.DocumentIngestorModels.Enums;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentIngestorModels.Entities;
|
||||
public class OwnerOverrideInfo : IValidatableObject
|
||||
{
|
||||
public OwnerOverrideInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public OwnerOverrideInfo(string userName, string entityId, EntityTypes entityType, int documentProcessingInfoId)
|
||||
{
|
||||
UserName = userName;
|
||||
EntityId = entityId;
|
||||
EntityType = entityType;
|
||||
DocumentProcessingInfoId = documentProcessingInfoId;
|
||||
}
|
||||
|
||||
public int OwnerOverrideInfoId { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public string EntityId { get; set; }
|
||||
public EntityTypes EntityType { get; set; }
|
||||
public int DocumentProcessingInfoId { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (EntityType == EntityTypes.Unknown && !string.IsNullOrWhiteSpace(EntityId))
|
||||
{
|
||||
yield return new ValidationResult("Cannot assign EntityType of 'Unknown' and assign EntityId.");
|
||||
}
|
||||
|
||||
if (EntityType != EntityTypes.Unknown && string.IsNullOrWhiteSpace(EntityId))
|
||||
{
|
||||
yield return new ValidationResult("There must be an EntityId if EntityType is not 'Unknown'.");
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(UserName))
|
||||
{
|
||||
yield return new ValidationResult("UserName cannot be null.");
|
||||
}
|
||||
|
||||
if (DocumentProcessingInfoId <= 0)
|
||||
{
|
||||
yield return new ValidationResult("DocumentProcessingInfoId must be greater than 0.");
|
||||
}
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentIngestorModels.Entities
|
||||
{
|
||||
public class PdfPartitionerLog
|
||||
{
|
||||
public PdfPartitionerLog()
|
||||
{
|
||||
}
|
||||
|
||||
public PdfPartitionerLog(Guid pdfPartitionerRunInfoId, DateTime logTimeStamp, string logMessage)
|
||||
{
|
||||
PdfPartitionerRunInfoId = pdfPartitionerRunInfoId;
|
||||
LogTimeStamp = logTimeStamp;
|
||||
LogMessage = logMessage;
|
||||
}
|
||||
|
||||
public int PdfPartitionerLogId { get; set; }
|
||||
public Guid PdfPartitionerRunInfoId { get; set; }
|
||||
public DateTime LogTimeStamp { get; set; }
|
||||
public string LogMessage { get; set; }
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentIngestorModels.Entities
|
||||
{
|
||||
public class ProcessingLog
|
||||
{
|
||||
public ProcessingLog()
|
||||
{
|
||||
}
|
||||
|
||||
public ProcessingLog(int documentProcessingInfoId, DateTime logTimeStamp, string logMessage, string userName)
|
||||
{
|
||||
DocumentProcessingInfoId = documentProcessingInfoId;
|
||||
LogTimeStamp = logTimeStamp;
|
||||
LogMessage = logMessage;
|
||||
UserName = userName;
|
||||
}
|
||||
|
||||
public int ProcessingLogId { get; set; }
|
||||
public int DocumentProcessingInfoId { get; set; }
|
||||
public DateTime LogTimeStamp { get; set; }
|
||||
public string LogMessage { get; set; }
|
||||
public string UserName { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user