using System.Security.Claims;
namespace adas_core.Application.Services.Interfaces;
public interface ILocalAuditService
{
///
/// Creates an asynchronous audit log entry capturing the original and modified data along with the user responsible for the change.
///
/// The claims principal representing the user who performed the action being audited. May be null if the action is performed by an unauthenticated or system context.
/// The original state of the data before the change. May be null when the action creates a new record.
/// The modified state of the data after the change. May be null when the action deletes an existing record.
/// An optional explanation or justification for the change. Defaults to null when no reason is provided.
/// A task that represents the asynchronous creation of the audit log entry.
Task CreateAuditLogAsync(ClaimsPrincipal? user, object? dataOriginal, object? dataModified, string? reason = null);
///
/// Asynchronously creates a deep copy of the specified data, producing a new independent instance of the same type.
///
/// The data instance to be deep copied.
/// A task that represents the asynchronous operation, containing the deep-copied instance of type , or null if the copy could not be produced.
Task DeepCopyAsync(T data);
}