namespace NTP.Application.Abstractions; /// /// One row of the legacy EVENTS audit table (port of services.cfc addEvent). /// RefColumn is the id column to fill: PERMITID, CRID, ORDERID, WAYBILLID (any identifier ^[A-Z][A-Z0-9_]{0,29}$). /// public sealed record EventEntry( string RefColumn, long RefId, string? PrevStatus, string? CurrentStatus, string? DoneBy, string EventType, string? Domain, string? LocationId, string UpdatedType = "NTP", string? Weight = null, IReadOnlyDictionary? ExtraColumns = null); public interface IEventLogger { /// /// Inserts into EVENTS using SEQ_EVENTS.nextval and bind variables. Participates in the active /// unit-of-work transaction. DONEBY is upper-cased (legacy). Extra column names are validated as plain Oracle /// identifiers and must not collide with the fixed columns; they must exist on EVENTS (e.g. REMARKS). /// Task AddAsync(EventEntry entry, CancellationToken ct = default); /// Same, taking DoneBy/Domain/LocationId from (legacy session.userid/domain/locationid). Task AddForCurrentUserAsync(string refColumn, long refId, string? prevStatus, string? currentStatus, string eventType, string? remarks = null, string? weight = null, CancellationToken ct = default); }