using GB5Shared.DTO.Framework.Login;
using System;
using System.Collections.Generic;
using System.Threading;
namespace GB5Shared.Archive
{
///
/// Optional interface for exporting audit rows to cold storage (S3, Azure Blob, etc.)
/// before or instead of the SQL archive table approach.
///
/// Implement per-environment as needed. The GB5 default archive strategy uses
/// TEVENTLOG_ARCHIVE (SQL); this interface exists for tenants that require
/// off-database long-term storage.
///
/// Typical usage: stream rows via , write to blob, then
/// call .
///
public interface IArchiveExportService
{
///
/// Streams audit event rows older than for the given tenant.
/// Caller is responsible for writing the stream to external storage.
///
IAsyncEnumerable ExportAsync(
DateTime olderThan,
LoginDTO login,
CancellationToken ct = default);
}
public sealed class AuditExportRow
{
public int EventLogId { get; set; }
public int EventTypeId { get; set; }
public int UserId { get; set; }
public int TenantId { get; set; }
public string? EventText { get; set; }
public string? Data { get; set; }
public DateTime Timestamp { get; set; }
}
}