using System.Data.Common; using GB5Shared.DTO.Framework.Login; namespace AccountsDAL.CustomCode.Warehouse { public interface IWarehouseFactPostingDAL { // Posts the given fact table (any FACTID sharing FFINANCE's family — OU+Day grain, // TVOUCHER/MACCOUNT/MACCOUNTGROUP source, nature-bucket aggregation) for a single OU across // the given dates, all within the caller-supplied transaction (one transaction per OU, per // WarehouseFactPostingBLL — never one transaction spanning multiple OUs, per this // codebase's own performance design for this feature). Task PostFactForOuAsync( int factId, int ouId, List targetDates, LoginDTO loginDTO, DbTransaction tx, CancellationToken ct); Task> GetActiveOuIdsAsync(LoginDTO loginDTO, CancellationToken ct); // Returns all fact IDs registered in MWAREHOUSEFACT (any POSTINGMODE, non-deleted). // Used by PostAll batch path — unlike GetDeltaEnabledFactIdsAsync (POSTINGMODE=1 only), // this covers every registered fact so a nightly batch reposts everything. Task> GetAllActiveFactIdsAsync(LoginDTO loginDTO, CancellationToken ct); // Updates MWAREHOUSEFACT.LASTPOSTEDDATEID/LASTPOSTEDON after a successful posting run. // lastPostedDateId is the DimDate.DateKey (YYYYMMDD int) of the latest date posted. Task UpdateLastPostedAsync(int factId, int lastPostedDateId, LoginDTO loginDTO, CancellationToken ct); } }