using FrameworkDAL.DTO.AutoScheduler; using FrameworkDAL.DTO.Scheduler; using GB5Shared.DTO.Framework.Login; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace FrameworkDAL.CustomCode.AutoScheduler { public interface IAutoSchedulerDAL { Task GetAutoScheduler(AutoSchedulerDTO AutoSchedulerDTO, LoginDTO LoginDTO); /// /// Returns the save confirmation message plus the JobId that was inserted/updated /// (needed by the BLL to call IQuartzSyncService.SyncJobAsync afterward). /// Task<(string Message, int JobId)> SaveAutoScheduler(AutoSchedulerDTO AutoSchedulerDTO, LoginDTO LoginDTO); /// /// Admin list (jobId = 0) or single-record fetch (jobId > 0) from MJOBDEFINE + TSCHEDULER. /// Task> GetJobDefineAsync(int jobId, LoginDTO login, CancellationToken ct); /// /// Updates MJOBDEFINE + MACTION in a transaction. RunAs fields are intentionally NOT /// updated (impersonation prevention) — only name/scheduler/service/criteria change. /// Task UpdateAutoSchedulerAsync(AutoSchedulerDTO dto, LoginDTO login, CancellationToken ct); /// /// Hard-deletes MACTION child rows then MJOBDEFINE parent in a transaction. /// Caller must remove the Quartz trigger first (QuartzSyncService.RemoveJobAsync). /// Task DeleteJobDefineAsync(int jobId, LoginDTO login, CancellationToken ct); } }