using RecruitmentDAL.DTO.SelectionProcess; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using System.Data.Common; using System.Threading; using System.Threading.Tasks; namespace RecruitmentDAL.CustomeCode.SelectionProcess { public interface ISelectionProcessDAL { #region SelectionProcessTemplate Task GetSelectionProcessTemplate(int SelectionProcessTemplateId, LoginDTO LoginDTO, CancellationToken ct); Task GetSelectListSelectionProcessTemplate(CriteriaDTO CriteriaDTO, LoginDTO LoginDTO, CancellationToken ct); // Transactional write overloads — called from BaseEntityAppService.ExecuteSaveAsync's // persistFunc so the save participates in the single pipeline transaction. Task SaveSelectionProcessTemplate(SelectionProcessTemplateDTO SelectionProcessTemplateDTO, LoginDTO LoginDTO, DbTransaction tx, CancellationToken ct); Task UpdateSelectionProcessTemplate(SelectionProcessTemplateDTO SelectionProcessTemplateDTO, LoginDTO LoginDTO, DbTransaction tx, CancellationToken ct); Task DeleteSelectionProcessTemplate(int SelectionProcessTemplateId, LoginDTO LoginDTO, CancellationToken ct); #endregion #region SelectionProcessStage // List variant — returns every stage for a given template, ordered by StageOrder, so // the FE can render/edit the full pipeline sequence in one call. Task GetSelectionProcessStage(int SelectionProcessTemplateId, LoginDTO LoginDTO, CancellationToken ct); Task GetSelectListSelectionProcessStage(CriteriaDTO CriteriaDTO, LoginDTO LoginDTO, CancellationToken ct); Task SaveSelectionProcessStage(SelectionProcessStageDTO SelectionProcessStageDTO, LoginDTO LoginDTO, DbTransaction tx, CancellationToken ct); Task UpdateSelectionProcessStage(SelectionProcessStageDTO SelectionProcessStageDTO, LoginDTO LoginDTO, DbTransaction tx, CancellationToken ct); Task DeleteSelectionProcessStage(int SelectionProcessStageId, LoginDTO LoginDTO, CancellationToken ct); // Narrow read — the QuizId (TMS MQUIZ, cross-module, not a hard FK) a stage optionally // requires. Returns -1 when no quiz is required. Consumed by // RecruitmentBLL.Application.ApplicationBLL to check the stage a candidate is entering. Task GetSelectionProcessStageQuizId(int SelectionProcessStageId, LoginDTO LoginDTO, CancellationToken ct); // Narrow read — whether this stage is the "genuine Hired" terminal category // (STAGECATEGORY=7 AND ISTERMINAL=1). Consumed by // RecruitmentBLL.Application.ApplicationBLL's referral-eligibility-check hook // (Recruitment Phase 6). See SelectionProcessQB.GET_SELECTIONPROCESSSTAGE_TERMINALHIRE_FLAG. Task IsSelectionProcessStageTerminalHireCategory(int SelectionProcessStageId, LoginDTO LoginDTO, CancellationToken ct); #endregion } }