tbl_employeedocumenthistory

-1 rows


Description

Module: Employee Profile
Purpose: Stores version history of employee documents uploaded in the system.
Data: One row is created for each document change, upload, or approval/rejection event associated with an employee.
Process Usage:
- Tracks all document modification requests made by employees for approval.
- Maintains audit trail when document uploads are approved or rejected by HR/Admin.
- Ensures transparency and traceability of document versioning for compliance purposes.
Key Points:
- Each history record is linked to the main employee document record (tbl_employeedocument).
- Stores approval status and HR/admin remarks for each document revision.
Business Impact: Enables HR to monitor document changes, ensures compliance with audit requirements, and maintains historical integrity of employee documents.

Columns

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

Primary key
Format: BIGSERIAL (auto-increment)
Used as: Unique identifier for each document history record.

edocumentid int8 19 null
tbl_employeedocument.edocumentid fk_tbl_employeedocumenthistory R

Employee Document ID
Format: BIGINT
FK: public.tbl_employeedocument.edocumentid
Meaning: References the main employee document record for which this history is created.
Usage: Enables tracking of changes or approval cycles for a specific document.

employeeid varchar 20 null
tbl_employee_previous_pf.employeeid Implied Constraint R

Employee ID
Format: VARCHAR(20)
Meaning: Identifies which employee the document history belongs to.
Usage: Links document history entries to the corresponding employee profile.

edocumentname varchar 100 null

Document name
Format: VARCHAR(100)
Meaning: Name or title of the document, as defined in the document title table.
Usage: Helps in identifying the document under review or modification.

edcodate timestamp 29,6 null

Document upload date
Format: TIMESTAMP
Meaning: Date when the document was uploaded or modified.
Usage: Supports audit trails and approval tracking.

edocurl varchar 200 null

S3 File URL
Format: VARCHAR(200)
Meaning: The S3 or system path where the uploaded file is stored.
Usage: Used to retrieve and review the specific version of the uploaded document.

edocumentsize varchar 100 null

Document size
Format: VARCHAR(100)
Meaning: Size of the uploaded document file.
Usage: Useful for file validation and storage optimization.

status varchar 20 null

Record status
Format: VARCHAR(20)
Possible Values: Pending, Approved, Rejected
Meaning: Reflects the approval workflow state of the document update.
Usage: Determines whether the document is active, awaiting approval, or has been rejected.

rejectreason varchar 200 null

Rejection remarks
Format: VARCHAR(200)
Meaning: Contains the reason or feedback provided by HR/Admin when rejecting a document.
Usage: Enhances transparency during the approval workflow.

createddate timestamp 29,6 null
createdby varchar 50 null
modifieddate timestamp 29,6 null
modifiedby varchar 50 null
edocumentvalue varchar 100 null

Document value
Format: VARCHAR(100)
Meaning: Value selected based on document mapping type.
Usage: Represents metadata or a specific attribute linked to the document.

documentfor varchar 2147483647 null

Document category
Format: VARCHAR
Possible Values: PERSONAL_DETAIL_AADHAAR, PERSONAL_DETAIL_PAN, PERSONAL_DETAIL_DRIVING_LICENSE, PERSONAL_DETAIL_VOTER_CARD, ADDRESS_DETAIL_CURRENT, ADDRESS_DETAIL_PERMANENT, QUALIFICATION_DETAIL, BANK_DETAIL, CERTIFICATE_TRAINING_DETAIL, EXPERIENCE_DETAIL, PASSPORT_VISA_DETAIL, REFERENCE_DOCUMENT, PERSONAL_DETAIL_UAN
Meaning: Defines the specific category or usage type of the document.
Usage: Used for filtering and classification of employee documents across modules.

document_title_id int8 19 null

Document Title ID
Format: BIGINT
FK: public.tbl_document_title.id
Meaning: References the master document title definition.
Usage: Ensures consistency and categorization of document records based on predefined titles.

Indexes

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

Relationships