candidate_offer_document_history

-1 rows


Description

Module: HRMS Recruitment & Onboarding (Audit)
Purpose: Provides a complete, immutable audit trail for all changes to a candidate’s document records.
Data: One row is created for each significant action (e.g., upload, status change, remark addition) on a candidate_offer_document record.
Process Usage:
- Automatically populated by system triggers on CUD operations on the parent table.
- Used by administrators and auditors to review the lifecycle of document verification.
Key Points:
- Ensures data integrity and provides a historical log for compliance.
- Stores a JSON snapshot of the data at the time of the event.
Business Impact: Essential for auditability, dispute resolution, and tracking SLAs for the verification process.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id bigserial 19 nextval('candidate_offer_document_history_id_seq'::regclass)

Primary key
Format: Integer (auto-increment)
Used as: Unique identifier for a single historical event.

candidate_offer_id int8 19 null

FK: public.tbl_candidate_offer.id
Meaning: The parent job offer to which this historical document event belongs.
Dependency: Allows for efficient querying of all historical events for a specific candidate offer.

history_object text 2147483647 null

A snapshot of the data from the parent record.
Format: JSONB or TEXT
Logic: Contains the full state of the candidate_offer_document row at the moment the change occurred. This allows for point-in-time reconstruction of the record.

createdby varchar 500 null

FK: public.tbl_userlogin.id or public.tbl_employee.employeeid
Meaning: The user (candidate or HR employee) who performed the action that triggered this history record.
Usage: Identifies who changed the status, uploaded a file, or added a remark.

createddate timestamp 29,6 null

Timestamp of when the historical event occurred.
Stored as: UTC
UI: Converts to user’s local timezone
Format: 2025-10-08T18:01:47Z → 08 Oct 2025, 11:31pm (IST)

modifiedby varchar 500 null
modifieddate timestamp 29,6 null

Indexes

Constraint Name Type Sort Column(s)
candidate_offer_document_history_pkey Primary key Asc id

Relationships