API · v1 · stabiel
CODEMETA OSDeveloper Center
NL
Console openen
Entity · time_accounts

Time Account Schema

Schema-ID
time_account
Collection
time_accounts
Permissions
  • Lezentime_account_view
  • Aanmakentime_account_manage
  • Wijzigentime_account_manage
  • Verwijderentime_account_manage

Velden

Time Account Schema

time_accounts4 permissions

Stundenkonto pro Mitarbeiter und Kontotyp (ADR 0036b)

userIduuidvereist

Kontoinhaber (users._id)

accountTypestringvereist

FLEX = Gleitzeit-Saldo; OVERTIME = genehmigte Überstunden; ANNUAL = Jahresarbeitszeit; LONG_TERM = Langzeit/Sabbatical

FLEXOVERTIMEANNUALLONG_TERM
statusstringvereist

ACTIVE = Buchungen erlaubt; FROZEN = keine neuen Buchungen, aber sichtbar; CLOSED = endgültig geschlossen (z.B. nach Offboarding)

ACTIVEFROZENCLOSED
Default: "ACTIVE"
currentBalanceMinutesintegeroptioneel

Laufender Saldo in Minuten. Positiv = Guthaben, negativ = Schuld. Vom Service verwaltet, nicht direkt per Schema-Validierung änderbar (in entity-config.protectedFields).

Default: 0read-only
lastClosingDatestringoptioneel

Datum des letzten erfolgreichen monthly_closing

Patternnullable
periodStartstringvereist

Beginn der aktuellen Abrechnungsperiode

Pattern
periodEndstringoptioneel

Ende der aktuellen Abrechnungsperiode; 9999-12-31 bei LONG_TERM

Pattern
limitsobjectoptioneel

Kappungsgrenzen. Initial aus working_time_model.overtimeRules abgeleitet, pro Konto überschreibbar.

nullable
maxBalanceMinutesintegeroptioneel

Obergrenze; Überschreitung → Kappung oder Überlauf auf OVERTIME

nullable
minBalanceMinutesintegeroptioneel

Untergrenze (negativ erlaubt, null = unbegrenzt). Unterschreitung → Flag MIN_BALANCE_VIOLATED

nullable
carryOverMaxMinutesintegeroptioneel

Max. Übertrag in die nächste Periode

nullable
carryOverDeadlineMonthsintegeroptioneel

Verfallsfrist für Übertrag in Monaten

≥ 0nullable
warnAboveMinutesintegeroptioneel

Ampel gelb ab diesem Saldo (rot ab maxBalanceMinutes)

nullable
warnBelowMinutesintegeroptioneel

Ampel gelb unter diesem Saldo (rot unter minBalanceMinutes)

nullable
warningLevelstringoptioneel

Ampelfarbe, über die zuletzt benachrichtigt wurde. Der nächtliche Lauf meldet nur, wenn die Farbe schlechter wird.

GREENYELLOWREDnull
nullable
workingTimeModelIduuidoptioneel

Optional: Modell zum Zeitpunkt der Konto-Erstellung. Für Audit-Zwecke. Die effektive Regel-Auflösung läuft zur Runtime über den Resolver, nicht dieses Feld.

nullable
openedAtdatetimeoptioneel

Zeitpunkt der Konto-Eröffnung

nullable
openedBystringoptioneel

userId der Person, die das Konto eröffnet hat; "system-auto" bei Auto-Create

max. 64 tekensnullable
closedAtdatetimeoptioneel
nullable
closedBystringoptioneel
max. 64 tekensnullable
notesstringoptioneel
max. 4000 tekensnullable

Standaard-endpoints

Deze resource volgt het generieke CRUD-contract van het platform. Lees de conventies voor paginering, idempotentie, optimistic locking en audit. De belangrijkste endpoints:

  • GET /api/v1/time_accounts — Lijst, gepagineerd + filterbaar
  • GET /api/v1/time_accounts/<id> — Enkele entity
  • POST /api/v1/time_accounts — Aanmaken
  • PATCH /api/v1/time_accounts/<id> — Gedeeltelijke update
  • DELETE /api/v1/time_accounts/<id> — Soft-delete
  • GET /api/v1/time_accounts/<id>/timeline — Audit + activiteiten

Zoeken