Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Version: 1.0.0
Last Updated: 2026-01-11
Module: Human Resources
Prefix: hr_
Tables: 75

Changelog

  • 1.0.0 (2026-01-11): Initial ERD documentation

Overview

The Human Resources module manages the complete employee lifecycle including positions, departments, leave management, time tracking, payroll, and applicant tracking (ATS).

Core Employee ERD

Leave Management ERD

Time & Attendance ERD

Payroll ERD

Applicant Tracking (ATS) ERD

RLS Policy Coverage

TableSELECTINSERTUPDATEDELETEWITH CHECKStatus
hr_employeesComplete
hr_positionsComplete
hr_departments_vComplete
hr_leave_requestsComplete
hr_leave_balancesComplete
hr_timesheetsComplete
hr_timesheet_entriesComplete
hr_payroll_runsComplete
hr_payroll_recordsComplete
hr_payroll_audit_log---Audit table
hr_ssn_access_log---Audit table
hr_document_access_logs---Audit table

Key Tables

hr_employees

Core employee record with personal info, employment status, and org assignment.

hr_positions

Job positions with salary ranges, requirements, and department assignment.

hr_leave_requests

Leave/PTO requests with approval workflow integration.

hr_timesheets

Weekly/bi-weekly time tracking with approval status.

hr_payroll_runs

Payroll processing batches with summary totals.

Helper Functions

FunctionPurpose
hr_has_org_access(org_id, user_id)Check HR module access
hr_is_manager_of(employee_id, user_id)Check management hierarchy
hr_get_direct_reports(manager_id)Get employees reporting to manager
hr_calculate_leave_balance(employee_id, type_id)Calculate current balance

Cross-Module Dependencies

  • PF: Organizations, profiles, user roles
  • FA: Payroll journal entries, expense reimbursements
  • FW: Leave request workflows, onboarding forms
  • FM: Employee assigned assets