using System; namespace RecruitmentDAL.DTO.FlsBridge { // TRECRUITMENTFLSACTION — one row per dispatched FLS respondent/token, in Recruitment terms. // Unified adapter covering all 5 candidate/referee-facing no-login token-link interactions // (unlike TMS's single-purpose TASSESSMENTFLSBRIDGE, these 5 action types have different // shapes, so ApplicationId/JobOfferId/InterviewId/ApplicationStageHistoryId are all present // on one row, with only the ones relevant to ActionType meaningfully populated — the rest // stay at their -1 sentinel default). public class RecruitmentFlsActionDTO { #region PrivateMembers private int recruitmentflsactionid; private int flsrespondentid = -1; // Plain int — NOT a real FK to MFLSRESPONDENT (see migration header) private byte actiontype = 1; // 1=DetailedApplication 2=ReferenceCheck 3=OfferResponse 4=ShortlistAck 5=InterviewSlotConfirm 6=VoluntarySelfId private int applicationid = -1; // FK TAPPLICATION — always set private int jobofferid = -1; // FK MJOBOFFER — only meaningful for ActionType=3 private int interviewid = -1; // FK TINTERVIEW — only meaningful for ActionType=5 private int applicationstagehistoryid = -1; // FK TAPPLICATIONSTAGEHISTORY — set once outcome recorded (ReferenceCheck/ShortlistAck) private int bgverificationid = -1; // FK TBGVERIFICATION — only meaningful for ActionType=2 (ReferenceCheck) dispatched as part of Phase 6 BG verification; -1 sentinel otherwise (see Phase 6 migration header) private string? responsepayload; // Submitted answers/decision as raw JSON; null until responded private DateTime? respondedon; // Null until the candidate/referee actually submits #region Standard private byte status = 1; private short version; private int tenantid; #endregion #region Base private int createdbyid; private DateTime createdon; private string? createdbyname; private int modifiedbyid; private DateTime modifiedon; private string? modifiedbyname; #endregion #endregion #region PublicMembers public int RecruitmentFlsActionId { get { return recruitmentflsactionid; } set { recruitmentflsactionid = value; } } public int FlsRespondentId { get { return flsrespondentid; } set { flsrespondentid = value; } } public byte ActionType { get { return actiontype; } set { actiontype = value; } } public int ApplicationId { get { return applicationid; } set { applicationid = value; } } public int JobOfferId { get { return jobofferid; } set { jobofferid = value; } } public int InterviewId { get { return interviewid; } set { interviewid = value; } } public int ApplicationStageHistoryId { get { return applicationstagehistoryid; } set { applicationstagehistoryid = value; } } // Phase 6 — additive link from a ReferenceCheck (ActionType=2) dispatch back to the // specific TBGVERIFICATION row (CheckType=Reference) it's fulfilling. -1 sentinel // (default) preserves the exact existing behavior for the other 5 action types and for // any ReferenceCheck dispatched outside the BG-verification flow. public int BgVerificationId { get { return bgverificationid; } set { bgverificationid = value; } } public string? ResponsePayload { get { return responsepayload; } set { responsepayload = value; } } public DateTime? RespondedOn { get { return respondedon; } set { respondedon = value; } } #region Standard public byte Status { get { return status; } set { status = value; } } public short Version { get { return version; } set { version = value; } } public int TenantId { get { return tenantid; } set { tenantid = value; } } #endregion #region Base public int CreatedById { get { return createdbyid; } set { createdbyid = value; } } public DateTime CreatedOn { get { return createdon; } set { createdon = value; } } public string? CreatedByName { get { return createdbyname; } set { createdbyname = value; } } public int ModifiedById { get { return modifiedbyid; } set { modifiedbyid = value; } } public DateTime ModifiedOn { get { return modifiedon; } set { modifiedon = value; } } public string? ModifiedByName { get { return modifiedbyname; } set { modifiedbyname = value; } } #endregion #endregion } // ── ActionType enum values, mirrored as plain constants (byte, not a real enum, matching // this module's existing convention of documenting Byte "enums" via header comments — // e.g. ApplicationDTO.ApplicationSource / ApplicationStageHistoryDTO.Outcome) ── // // VoluntarySelfId (6) — voluntary DEI/diversity self-disclosure (MCANDIDATEDEMOGRAPHIC). // Unlike the other 5 action types, this one carries a hard requirement: it must always be // dispatched via its own explicit PrepareActionAsync call, never bundled into or auto-fired // alongside another action (e.g. never fired automatically when a candidate submits a // DetailedApplication). See RecruitmentFlsBridgeBLL.PrepareActionAsync's doc comment for the // enforcement note, and CandidateDemographicBLL.SaveCandidateDemographic for the consent // guard that governs what actually gets persisted from the submitted payload. public static class RecruitmentFlsActionType { public const byte DetailedApplication = 1; public const byte ReferenceCheck = 2; public const byte OfferResponse = 3; public const byte ShortlistAck = 4; public const byte InterviewSlotConfirm = 5; public const byte VoluntarySelfId = 6; } }