22 lines
1.1 KiB
C#
22 lines
1.1 KiB
C#
namespace PowderCoating.Application.Interfaces;
|
|
|
|
/// <summary>
|
|
/// Writes manual entries to the AuditLog table for operations that are not captured
|
|
/// automatically by the EF SaveChanges interceptor — imports, exports, and future
|
|
/// platform-level events. Uses the same table and viewer as the interceptor so all
|
|
/// audit history is in one place.
|
|
/// </summary>
|
|
public interface IAuditService
|
|
{
|
|
/// <summary>
|
|
/// Appends a single row to AuditLogs outside of the EF change tracker.
|
|
/// </summary>
|
|
/// <param name="action">Verb describing the event, e.g. "Imported", "Exported".</param>
|
|
/// <param name="entityType">Logical category, e.g. "Customers", "AccountingExport".</param>
|
|
/// <param name="description">Short human-readable label shown in the audit viewer.</param>
|
|
/// <param name="details">Optional object serialised to JSON and stored in NewValues.</param>
|
|
/// <param name="entityId">Optional identifier for the affected record.</param>
|
|
Task LogAsync(string action, string entityType, string? description = null,
|
|
object? details = null, string? entityId = null);
|
|
}
|