API · v1 · stabil
CODEMETA OSDeveloper Center
DE
Konsole öffnen
Entity · time_accounts

Time Account Schema

Schema-ID
time_account
Collection
time_accounts
Permissions
  • Lesentime_account_view
  • Anlegentime_account_manage
  • Änderntime_account_manage
  • Löschentime_account_manage

Felder

Time Account Schema

time_accounts4 Permissions

Stundenkonto pro Mitarbeiter und Kontotyp (ADR 0036b)

userIduuiderforderlich

Kontoinhaber (users._id)

accountTypestringerforderlich

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

FLEXOVERTIMEANNUALLONG_TERM
statusstringerforderlich

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

ACTIVEFROZENCLOSED
Default: "ACTIVE"
currentBalanceMinutesintegeroptional

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

Default: 0read-only
lastClosingDatestringoptional

Datum des letzten erfolgreichen monthly_closing

Patternnullable
periodStartstringerforderlich

Beginn der aktuellen Abrechnungsperiode

Pattern
periodEndstringoptional

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

Pattern
limitsobjectoptional

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

nullable
maxBalanceMinutesintegeroptional

Obergrenze; Überschreitung → Kappung oder Überlauf auf OVERTIME

nullable
minBalanceMinutesintegeroptional

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

nullable
carryOverMaxMinutesintegeroptional

Max. Übertrag in die nächste Periode

nullable
carryOverDeadlineMonthsintegeroptional

Verfallsfrist für Übertrag in Monaten

≥ 0nullable
warnAboveMinutesintegeroptional

Ampel gelb ab diesem Saldo (rot ab maxBalanceMinutes)

nullable
warnBelowMinutesintegeroptional

Ampel gelb unter diesem Saldo (rot unter minBalanceMinutes)

nullable
warningLevelstringoptional

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

GREENYELLOWREDnull
nullable
workingTimeModelIduuidoptional

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
openedAtdatetimeoptional

Zeitpunkt der Konto-Eröffnung

nullable
openedBystringoptional

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

max 64 Zeichennullable
closedAtdatetimeoptional
nullable
closedBystringoptional
max 64 Zeichennullable
notesstringoptional
max 4000 Zeichennullable

Standard-Endpoints

Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:

  • GET /api/v1/time_accounts — Liste, paginiert + filterbar
  • GET /api/v1/time_accounts/<id> — Einzelne Entity
  • POST /api/v1/time_accounts — Anlegen
  • PATCH /api/v1/time_accounts/<id> — Teil-Update
  • DELETE /api/v1/time_accounts/<id> — Soft-Delete
  • GET /api/v1/time_accounts/<id>/timeline — Audit + Aktivitäten

Suche