Skip to main content
Time and attendance answers what was worked. What was paid is a separate set of models that will not add up to match it, and often comes from a different system - see Payroll. Three models cover it, and none of them points at the others.

The models

Time off models the approval process, not the result. A record exists from the moment someone asks, and status is REQUESTED, APPROVED, DECLINED, CANCELLED or DELETED. Read it without filtering on status and you count leave that was never taken.
units is HOURS or DAYS, and the source system decides which - sometimes varying by policy within one connector. Read it on every record, because amount means nothing without it. request_type and policy_type are the cleaned-up leave categories, and a value the connector sends outside the enum passes through unchanged - see Enum values.

How they connect

The employee is the only thing these models share. A leave request does not point at the balance it draws down, and a timesheet entry does not point at the payroll run that paid it. The fourth edge is the entire connection between hours and money, so anything beyond it is arithmetic your application does itself. Hours worked and hours paid drift apart routinely: overtime follows rules the timesheet does not capture, salaried employees are paid without timesheets, corrections land in a later run than the period they fix, and approval workflows mean not every logged entry reaches pay.

How many per employee

A balance is the source system’s own calculation, dated to the last sync rather than live. A request approved since then will not be reflected, which matters when you show someone a remaining balance before they book leave. Timesheets vary more. Source systems record time as punches, durations, intervals with breaks inside them, or plain daily totals, and flattening those into one shape loses detail that stays available in raw_data. Compare raw entries against raw entries, never against a customer’s computed report, because rounding and overtime rules are applied after the entries are recorded.

What you can write

Time off and timesheet entry both accept writes - see Create a time off request. Time off balance is read-only, since the balance is computed upstream.