using System; using System.Collections.Generic; namespace RecruitmentDAL.DTO.FlsBridge { // Request shape for RecruitmentFlsBridgeBLL.PrepareActionAsync — an authenticated, // internal-caller DTO (e.g. called right after an offer save, a reference-check dispatch, // a shortlist decision, or an interview being scheduled) that mints a token link for one of // the 5 action types. public class PrepareRecruitmentFlsActionDTO { public byte ActionType { get; set; } public int ApplicationId { get; set; } public int JobOfferId { get; set; } = -1; public int InterviewId { get; set; } = -1; public string? RecipientName { get; set; } public string? RecipientEmail { get; set; } // Phase 6 — set by the caller when dispatching ActionType=ReferenceCheck (2) as part of // BG verification, so the referee's submission can be linked back to the specific // TBGVERIFICATION row it's fulfilling. Leave at the -1 sentinel for every other dispatch // (including a plain, non-BG-verification reference check) — additive only, does not // change behavior for the other 5 action types. public int BgVerificationId { get; set; } = -1; } public class PrepareRecruitmentFlsActionResultDTO { public Guid AccessToken { get; set; } public DateTime? TokenExpiry { get; set; } public int RecruitmentFlsActionId { get; set; } } // Transient (never persisted as its own row — see migration header on why this module adds // no separate coordinator table) resolution result for the shared per-tenant // MFLSREGISTRATION/MFLSINSTANCE/MFLSINSTANCEGROUP triple that every Recruitment FLS action // dispatch reuses, located by natural key (RegistrationCode/InstanceCode/GroupCode). public class RecruitmentFlsCoordinatorRef { public int FlsInstanceId { get; set; } public int GroupId { get; set; } } // Minimal, best-effort parse target for RESPONSEPAYLOAD JSON submitted by the candidate/ // referee — the 5 action types have different real shapes on the FE side, so this only // extracts the handful of fields RecruitmentFlsBridgeBLL.SubmitActionAsync needs to drive // its per-ActionType side effect. Anything not recognized is preserved verbatim in // RecruitmentFlsActionDTO.ResponsePayload regardless — this is a read helper, not a schema. public class FlsActionResponsePayload { // OfferResponse (ActionType=3): "Accept" or "Decline" (case-insensitive). public string? Decision { get; set; } // ReferenceCheck/ShortlistAck (ActionType=2/4): stage-history Outcome (1=Pending // 2=Passed 3=Failed 4=Skipped 5=Delayed 6=DroppedOff) — defaults to 2 (Passed) for a // ShortlistAck (acknowledging is itself a pass) and must be supplied for ReferenceCheck. public byte? Outcome { get; set; } public string? Recommendation { get; set; } public string? Remarks { get; set; } // InterviewSlotConfirm (ActionType=5): true=Confirmed, false=Reschedule requested. public bool? Confirmed { get; set; } public string? RescheduleReason { get; set; } // DetailedApplication (ActionType=1): free-form extended-answer bag — stored verbatim, // no other entity is updated for this action type. public Dictionary? Answers { get; set; } // VoluntarySelfId (ActionType=6): voluntary DEI/diversity self-disclosure. ConsentToCollect // must be true, EXPLICITLY, in this exact payload for any of the 5 fields below to ever be // persisted — RecruitmentFlsBridgeBLL.SubmitActionAsync's VoluntarySelfId case passes these // straight through to CandidateDemographicBLL.SaveCandidateDemographic, which re-enforces // the same guard independently (defense-in-depth: the guard holds even if a future caller // reaches that BLL method some other way). Omitting ConsentToCollect, or sending it as // false, is always safe — it never causes any of the other 4 fields to be written. public bool? ConsentToCollect { get; set; } public string? GenderIdentity { get; set; } public string? EthnicityRace { get; set; } public byte? DisabilityStatus { get; set; } public byte? VeteranStatus { get; set; } public byte? AgeBand { get; set; } } }