using AmpDAL.DTO.ApiRequestTimeline; using AMPDAL.Query.ApiRequestTimeline; using GB5Shared.DTO.Framework.Login; using GB5Shared.QueryExecutor; namespace AmpDAL.CustomCode.ApiRequestTimeline; public class ApiRequestTimelineDAL(IQueryExecutor _qe) : IApiRequestTimelineDAL { public async Task> GetTimelineAsync(int apiRequestId, int tenantId, LoginDTO login, CancellationToken ct) { var result = await _qe.QueryAsync( login, ApiRequestTimelineQB.GET_TIMELINE, new { ApiRequestId = apiRequestId, TenantId = tenantId }, null, false, ct).ConfigureAwait(false); return result.ToList(); } public async Task InsertTimelineEntryAsync(ApiRequestTimelineSaveDTO dto, LoginDTO login, CancellationToken ct) => await _qe.ExecuteAsync( login, ApiRequestTimelineQB.INSERT_TIMELINE, new { dto.TimelineId, dto.TenantId, dto.ApiRequestId, dto.FromStatus, dto.ToStatus, dto.ActionTakenById, dto.Comments, dto.AttachmentUrl }).ConfigureAwait(false); }