Files
monorepo/LCU.API.Internal.FileOperations/LCU.Library.Internal.FileOperationsModels/Models/ExtractIndexFileDataRequest.cs
T
2026-04-27 10:50:07 -05:00

58 lines
2.0 KiB
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.IO;
using LCU.Library.Internal.ApiResponse.Models;
using LCU.Library.Internal.FileOperationsModels.Enums;
using LCU.Library.Internal.FileOperationsModels.Models.NameSettings;
using LCU.Library.Internal.FileOperationsModels.Shared;
using LCU.Library.Internal.LcuEvaluationModels.Entities;
namespace LCU.Library.Internal.FileOperationsModels.Models;
public class ExtractIndexFileDataRequest : ReturnResponse
{
public string IndexFilePath { get; set; }
public DynamicNameSetting IndexFilePathSetting { get; set; }
public string IndexFileName { get; set; }
public DynamicNameSetting IndexFileNameSetting { get; set; }
public Delimiters DelimiterType { get; set; }
public bool ExtractAllIndexes { get; set; }
public List<int> IndexesToExtract { get; set; }
public EvaluationDetail EvaluationRule { get; set; }
public string DestinationIndexFileName { get; set; }
public string DestinationFilePath { get; set; }
public DynamicNameSetting DestinationFilePathSetting { get; set; }
public bool AppendToDestinationIndexFile { get; set; }
public bool IndexHasHeaders { get; set; }
[NotMapped]
public string FinalIndexFileName => DynamicNameBuilder.BuildDynamicName(IndexFileName, IndexFileNameSetting);
[NotMapped]
public string FinalIndexFileDirectory
{
get
{
var indexFilePath = IndexFilePath.EndsWith("\\") ? IndexFilePath : $"{IndexFilePath}\\";
return DynamicNameBuilder.BuildDynamicName(indexFilePath, IndexFilePathSetting);
}
}
[NotMapped]
public string FinalIndexFilePath => Path.Combine(FinalIndexFileDirectory, FinalIndexFileName);
[NotMapped]
public string FinalDestinationPath
{
get
{
var destinationFilePath = DestinationFilePath.EndsWith("\\") ? DestinationFilePath : $"{DestinationFilePath}\\";
return DynamicNameBuilder.BuildDynamicName(destinationFilePath, DestinationFilePathSetting);
}
}
[NotMapped]
public string FinalDestinationIndexFilePath => Path.Combine(FinalDestinationPath, DestinationIndexFileName);
}