adding
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentModels.Requests;
|
||||
|
||||
public class DeleteDocumentContentRequest
|
||||
{
|
||||
[Required] public Guid DocumentId { get; set; }
|
||||
public string? Reason { get; set; }
|
||||
public string UserName { get; set; } = "System";
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
namespace LCU.Library.Internal.DocumentModels.Requests;
|
||||
|
||||
public enum DocumentAction
|
||||
{
|
||||
Download,
|
||||
Upload,
|
||||
Delete,
|
||||
DeleteContent
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentModels.Requests;
|
||||
|
||||
public class DocumentActionNotificationRequest
|
||||
{
|
||||
[Required] public DocumentAction Action { get; set; }
|
||||
[Required] public string Source { get; set; }
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentModels.Requests;
|
||||
|
||||
public class DocumentRequest
|
||||
{
|
||||
[Required] public string Name { get; set; }
|
||||
|
||||
[Required] public string Type { get; set; }
|
||||
|
||||
[Required] public byte[] Content { get; set; }
|
||||
|
||||
[Required] public string Source { get; set; }
|
||||
|
||||
[Required] public string DataSource { get; set; }
|
||||
|
||||
[Required] public DateTime CreatedDate { get; set; }
|
||||
|
||||
public Guid? TraceId { get; set; }
|
||||
|
||||
public string[] PersonNumbers { get; set; }
|
||||
|
||||
public string[] OrganizationNumbers { get; set; }
|
||||
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
public Dictionary<string, string> Attributes { get; set; }
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Web;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentModels.Requests.Search;
|
||||
|
||||
public class DocumentInformationFilter
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public string? Type { get; set; }
|
||||
public string? BusinessName { get; set; }
|
||||
public string[]? TypeContainsAny { get; set; }
|
||||
public bool? ScanStatus { get; set; }
|
||||
public string? Source { get; set; }
|
||||
public string? DataSource { get; set; }
|
||||
public Guid? TraceId { get; set; }
|
||||
public string? PersonNumbersEquals { get; set; }
|
||||
public string[]? PersonNumbersContains { get; set; }
|
||||
public string[]? PersonNumbersContainsAny { get; set; }
|
||||
public string? OrganizationNumbersEquals { get; set; }
|
||||
public string[]? OrganizationNumbersContains { get; set; }
|
||||
public string[]? OrganizationNumbersContainsAny { get; set; }
|
||||
public string? AccountNumberEquals { get; set; }
|
||||
public string[]? AccountNumberContainsAny { get; set; }
|
||||
public Dictionary<string, string>? AttributesEquals { get; set; }
|
||||
public Dictionary<string, string>? AttributesContains { get; set; }
|
||||
public Dictionary<string, string>? AttributesContainsAny { get; set; }
|
||||
public DateTime? CreatedDateMinimum { get; set; }
|
||||
public DateTime? CreatedDateMaximum { get; set; }
|
||||
public DateTime? UploadDateMinimum { get; set; }
|
||||
public DateTime? UploadDateMaximum { get; set; }
|
||||
public DateTime? LastModifiedMinimum { get; set; }
|
||||
public DateTime? LastModifiedDateMaximum { get; set; }
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using LCU.Library.Internal.DocumentIngestorModels.Models.Pagination;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentModels.Requests.Search;
|
||||
|
||||
public class DocumentInformationFilteredSearch
|
||||
{
|
||||
public DocumentInformationFilter Filter { get; set; }
|
||||
public int? Skip { get; set; }
|
||||
public int? Take { get; set; }
|
||||
public List<SortableField>? SortDefinition { get; set; }
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using LCU.Library.DocumentType.Models.Responses;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentModels.Requests.Search;
|
||||
|
||||
public class GetDocumentCleanupRequest
|
||||
{
|
||||
public List<DocumentCodeDetailsResponse> DocumentCodeDetailInfos { get; set; }
|
||||
public int Limit { get; set; }
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Driver;
|
||||
using LCU.Library.Internal.DocumentIngestorModels.Models.Pagination;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentModels.Requests.Search;
|
||||
|
||||
public class Sorter<T>
|
||||
{
|
||||
public static SortDefinition<T> GetSorter(List<SortableField> fields)
|
||||
{
|
||||
SortDefinition<T>? sortDefinition = null;
|
||||
|
||||
if(fields == null)
|
||||
{
|
||||
return sortDefinition;
|
||||
}
|
||||
|
||||
fields.Sort((a, b) => a.Position.CompareTo(b.Position));
|
||||
|
||||
foreach (var field in fields)
|
||||
{
|
||||
if (sortDefinition == null)
|
||||
{
|
||||
sortDefinition = field.IsDescending ? Builders<T>.Sort.Descending(field.Field) : Builders<T>.Sort.Ascending(field.Field);
|
||||
}
|
||||
else
|
||||
{
|
||||
sortDefinition = field.IsDescending ? sortDefinition.Descending(field.Field) : sortDefinition.Ascending(field.Field);
|
||||
}
|
||||
}
|
||||
|
||||
return sortDefinition;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentModels.Requests;
|
||||
|
||||
public class UpdateDocumentContentRequest
|
||||
{
|
||||
[Required] public byte[] Content { get; set; }
|
||||
|
||||
[Required] public string UpdateSource { get; set; }
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentModels.Requests;
|
||||
|
||||
public class UpdateDocumentInformationRequest
|
||||
{
|
||||
[Required] public string Name { get; set; }
|
||||
|
||||
[Required] public string Type { get; set; }
|
||||
|
||||
[Required] public string UpdateSource { get; set; }
|
||||
|
||||
public string[] PersonNumbers { get; set; }
|
||||
|
||||
public string[] OrganizationNumbers { get; set; }
|
||||
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
public Dictionary<string, string> Attributes { get; set; }
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentModels.Requests;
|
||||
|
||||
public class UpdateDocumentRequest
|
||||
{
|
||||
[Required] public string Name { get; set; }
|
||||
|
||||
[Required] public string Type { get; set; }
|
||||
|
||||
[Required] public byte[] Content { get; set; }
|
||||
|
||||
[Required] public string UpdateSource { get; set; }
|
||||
|
||||
public string[] PersonNumbers { get; set; }
|
||||
|
||||
public string[] OrganizationNumbers { get; set; }
|
||||
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
public Dictionary<string, string> Attributes { get; set; }
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace LCU.Library.Internal.DocumentModels.Requests;
|
||||
|
||||
public class UpdateDocumentScanStatusRequest
|
||||
{
|
||||
[Required] public List<Guid> DocumentBlobIds { get; set; }
|
||||
[Required] public bool ScanStatus { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user