using AccountsDAL.DTO.Warehouse; using GB5Shared.DTO.Framework.Login; namespace AccountsDAL.CustomCode.Warehouse { public interface IWarehouseChangeQueueDAL { // Returns the list of factIds that have POSTINGMODE=1 (DeltaEnabled). Task> GetDeltaEnabledFactIdsAsync(LoginDTO login, CancellationToken ct); // Enqueues a change for a given FactId + OuId + ActivityDate, skipping if a pending // row already exists for the same combination (idempotent). Task EnqueueIfNotPendingAsync(int factId, int ouId, DateTime activityDate, LoginDTO login, CancellationToken ct); // Claims all pending rows for the given factId (sets PROCESSEDON) and returns them. // The UPDATE+OUTPUT is atomic, so concurrent invocations never double-process the same row. Task> ClaimAndGetPendingAsync(int factId, LoginDTO login, CancellationToken ct); } }