using ROLAC.API.Entities.Logging;
namespace ROLAC.API.Services.Logging;
///
/// Records audit events that don't flow through EF change tracking — security actions
/// (login/logout/role changes) and key business actions (check issued, expense approved, ...).
/// Data-change audits are produced automatically by AuditLogInterceptor; use this for the
/// semantic action + human summary the raw diff can't express.
///
public interface IAuditLogger
{
///
/// Build and enqueue an audit row. / are
/// serialized into the Changes JSON. Never throws — failures are dropped like all logs.
///
void Write(
string action,
string category,
LogLevelEnum level = LogLevelEnum.Information,
string? entityName = null,
string? entityId = null,
string? summary = null,
object? before = null,
object? after = null,
string? userId = null,
string? userEmail = null,
string? ipAddress = null);
}