StayExport Tracking - StayExportFile ExportDetails new type/format

- Added new class to unify and type the format of StayExportFile.ExportDetails field.

Note: This database migration will set to null all StayExportFile.ExportDetails data. This is required to prevent exceptions due to new formatting.
This commit is contained in:
Daniel-Garmig committed 2026-10-09 12:58:23 +02:00
1 parent cf62a0e55e
commit 54387a6346
15 files changed
+486 -35

No files matched your search

@@ -58,7 +58,14 @@ public class StayExportService(
{
//Create Format provider and export data to stream.
var provider = providerFactory.GetProvider(format);
(exportResult, stayExport.ExportDetails) = await provider.ExportDataAsync(stayList, exportedDataStream);
(exportResult, List<StayExportDetailsStayEntryDTO> entriesDetails) = await provider.ExportDataAsync(stayList, exportedDataStream);
stayExport.ExportDetails = new()
{
ExportedStayCount = entriesDetails.Count,
StayErrorCount = entriesDetails.Count(e => e.ExportResult == StayExportDetailsStayEntryResult.Error),
StayEntries = entriesDetails
};
// "Rewind" stream so it can be read from the begining when uploading.
exportedDataStream.Seek(0, SeekOrigin.Begin);