using Admin.NET.Plugin.AiDOP.DataPlatform.Core; namespace Admin.NET.Plugin.AiDOP.DataPlatform.UnifiedIngress; internal static class MdpIngestBatchJournal { internal static Task AppendAsync(ISqlSugarClient db, Guid batchId, IngestDatasetIdentity identity, string eventCode, int? count = null, string? diagnostic = null) => db.Ado.ExecuteCommandAsync(IngestBatchJournal.Insert, new { BatchId = batchId.ToString("D"), identity.TenantId, identity.FactoryId, identity.DatasetId, identity.SourceId, EventCode = eventCode, Attempt = (int?)null, Count = count, Diagnostic = diagnostic }); }