| candidate_id | UUID | FOREIGN KEY REFERENCES candidates(candidate_id) ON DELETE CASCADE | Related candidate |
-
| job_id | UUID | FOREIGN KEY REFERENCES jobs(job_id) ON DELETE SET NULL | Related job |
-
| manager_id | UUID | FOREIGN KEY REFERENCES managers(id) ON DELETE SET NULL | Related manager (if applicable) |
-
| type | ENUM | CHECK (type IN ('candidate_invite','candidate_response','manager_invite','manager_response','final_confirmation')) | Type of communication |
| status | ENUM | DEFAULT 'pending_candidate_response', CHECK (status IN ('pending_candidate_response','candidate_confirmed','pending_manager_response','manager_confirmed','confirmed','declined')) | Current communication status |
| received_at | TIMESTAMP | | Time message was received |
-
| created_at | TIMESTAMP | DEFAULT CURRENT_TIMESTAMP | Record creation time |
-
| updated_at | TIMESTAMP | DEFAULT CURRENT_TIMESTAMP | Record last update time |
+
+
**Purpose:** Stores all communication exchanges between the system, candidates, and managers- including interview invites, responses, and final confirmations.