using RecruitmentDAL.DTO.JobRequisition; namespace RecruitmentBLL.Integration { /// Single choke point for resolving "which recruiter owns this JobRequisition" for /// the three OKR recruiter-KPI push sites (JobRequisitionBLL's Closed transition, JobOfferBLL /// .RecordOfferResponseAsync, CandidateConversionBLL.ConvertCandidateToEmployeeAsync). /// /// JobRequisitionDTO.AssignedRecruiterId landed via a parallel task (see /// DB/Migrations/20260904_Recruitment_Phase5_Analytics_Schema_{SqlServer,Postgres}.sql and /// JobRequisitionQB's ASSIGNEDRECRUITERID column) — FK MUSER, -1 sentinel = unassigned, same /// convention as this DTO's other FK fields (JobPositionId/JobProfileId/etc default to -1). /// This resolves straight to that column now; kept as its own method (rather than inlining /// `jobRequisition.AssignedRecruiterId` at each of the three call sites) purely so all three /// stay in sync if the "-1 = unassigned" sentinel convention ever changes. internal static class RecruiterKpiHelper { public static int ResolveAssignedRecruiterId(JobRequisitionDTO? jobRequisition) => jobRequisition?.AssignedRecruiterId ?? -1; } }