tbl_leavecodemaster

7 rows


Description

Module: HRMS Leave Management
Purpose: Master table defining all types of leaves available in the organization with their fundamental characteristics.
Data: Stores leave type definitions including categorization, naming conventions, and status tracking.
Process Usage:
- Serves as the foundation for leave policy configuration and leave request processing.
- Used by leave application forms, balance calculations, and reporting systems.
Key Points:
- Defines hierarchical leave classification (Type → Sub-Type → Specific Categories).
- Establishes unique identifiers and naming conventions for all leave types.
Business Impact: Essential for standardized leave categorization, policy consistency, and regulatory compliance across the organization.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
leavecodeid bigserial 19 nextval('tbl_leavecodemaster_leavecodeid_seq'::regclass)
tbl_allotleaveaftereligibility.leavecodeid Implied Constraint R
tbl_clubbing.leavecodeid Implied Constraint R
tbl_leavebalancetransactions.leavecodeid fk_tbl_leavecodetobalancetransaction R
tbl_leavecodepolicyconfig.leavecodeid fk_tbl_leavecodepolicyconfig_leavecodeid R
tbl_leaveencashmentv1.leavecodeid Implied Constraint R
tbl_leaveentitlment.leavecodeid Implied Constraint R

Primary key
Format: BigSerial (auto-increment)
Used as: Unique identifier for each leave type definition in the system.

leavecodename varchar 50 null

Name for the leave type
Examples: “Sick Leave”, “Casual Leave”, “Maternity Leave”, “Optional Holiday”
Usage: Displayed in leave application dropdowns, reports, and policy configurations.

leavetype varchar 100 null

Primary leave classification
Values: PAID, UNPAID
PAID: Leave with salary continuation
UNPAID: Leave without pay, typically for extended absences
Impact: Determines salary processing during leave periods.

leavesubtype varchar 100 null

Secondary leave classification
Values: OPTIONAL_HOLIDAY, ANNIVERSARY, COMPENSATORY_OFF, MATERNITY, PATERNITY, CASUAL, SICK, EARNED, OTHER
Purpose: Enables granular policy configuration and specialized processing rules for each category.

typeofanniversary varchar 100 null

Anniversary category specification
Values: BIRTHDAY, MARRIAGE, WORK
BIRTHDAY: Personal birthday anniversary leaves
MARRIAGE: Marriage anniversary leaves
WORK: Work anniversary recognition leaves
Usage: Enables different policy rules for different anniversary types.

leavecodeprefix varchar 4 null

Unique identifier prefix for leave requests
Format: 2-4 character code
Example: “SL” for Sick Leave
Purpose: Provides traceable reference Character for leave transactions and audits.

leavedescription varchar 500 null

Detailed explanation of leave purpose and rules
Max Length: 500 characters
Usage: Helps employees understand when and how to use specific leave types, reduces misapplications.

leavesubtypevalue varchar 100 null

Specific sub-category refinement
Values: Same as leavesubtype
Usage: Provides additional categorization level for complex leave structures and reporting requirements.

isleavecodevisible bool 1 true

Flag indicating if this leave code should be visible to employees for self-service application.
Format: Boolean.

createdby varchar 50 null

FK: public.tbl_userlogin.id or public.tbl_employee.employeeid
Meaning: The user who created this leave code configuration.

createddate timestamp 29,6 null

Timestamp of when the leave code configuration record was created.
Format: Timestamp with timezone.

modifiedby varchar 50 null

FK: public.tbl_userlogin.id or public.tbl_employee.employeeid
Meaning: The last user who modified this leave code configuration record.

modifieddate timestamp 29,6 null

Timestamp of the last modification to the leave code configuration record.
Format: Timestamp with timezone.

leavecodestatus varchar 100 '''ACTIVE'''::character varying

Operational status of the leave type
Values: ACTIVE, INACTIVE
ACTIVE: Available for new leave applications and policy assignments
INACTIVE: Archived leave type, hidden from new applications but retained for historical data
Business Logic: Prevents deletion while maintaining data integrity for historical records.

Indexes

Constraint Name Type Sort Column(s)
pk__tbl_leavecodemaster_id Primary key Asc leavecodeid
ux_tbl_leavecodemaster__leavecodename Must be unique Asc leavecodename
ux_tbl_leavecodemaster__leavecodeprefix Must be unique Asc leavecodeprefix

Relationships