API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · time_accounts

Time Account Schema

ID du schéma
time_account
Collection
time_accounts
Autorisations
  • Liretime_account_view
  • Créertime_account_manage
  • Modifiertime_account_manage
  • Supprimertime_account_manage

Champs

Time Account Schema

time_accounts4 autorisations

Stundenkonto pro Mitarbeiter und Kontotyp (ADR 0036b)

userIduuidobligatoire

Kontoinhaber (users._id)

accountTypestringobligatoire

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

FLEXOVERTIMEANNUALLONG_TERM
statusstringobligatoire

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

ACTIVEFROZENCLOSED
Par défaut : "ACTIVE"
currentBalanceMinutesintegerfacultatif

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

Par défaut : 0lecture seule
lastClosingDatestringfacultatif

Datum des letzten erfolgreichen monthly_closing

Motifnullable
periodStartstringobligatoire

Beginn der aktuellen Abrechnungsperiode

Motif
periodEndstringfacultatif

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

Motif
limitsobjectfacultatif

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

nullable
maxBalanceMinutesintegerfacultatif

Obergrenze; Überschreitung → Kappung oder Überlauf auf OVERTIME

nullable
minBalanceMinutesintegerfacultatif

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

nullable
carryOverMaxMinutesintegerfacultatif

Max. Übertrag in die nächste Periode

nullable
carryOverDeadlineMonthsintegerfacultatif

Verfallsfrist für Übertrag in Monaten

≥ 0nullable
warnAboveMinutesintegerfacultatif

Ampel gelb ab diesem Saldo (rot ab maxBalanceMinutes)

nullable
warnBelowMinutesintegerfacultatif

Ampel gelb unter diesem Saldo (rot unter minBalanceMinutes)

nullable
warningLevelstringfacultatif

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

GREENYELLOWREDnull
nullable
workingTimeModelIduuidfacultatif

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
openedAtdatetimefacultatif

Zeitpunkt der Konto-Eröffnung

nullable
openedBystringfacultatif

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

max. 64 caractèresnullable
closedAtdatetimefacultatif
nullable
closedBystringfacultatif
max. 64 caractèresnullable
notesstringfacultatif
max. 4000 caractèresnullable

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/time_accounts — Liste, paginée et filtrable
  • GET /api/v1/time_accounts/<id> — Une entité
  • POST /api/v1/time_accounts — Créer
  • PATCH /api/v1/time_accounts/<id> — Mise à jour partielle
  • DELETE /api/v1/time_accounts/<id> — Suppression logique
  • GET /api/v1/time_accounts/<id>/timeline — Audit et activités

Recherche