CoachClientStatusEvents table
The CoachClientStatusEvents table in the FitStack - V2 schema has 7 columns, keyed by Id, with 2 foreign keys to CoachClients and Users.
v2 ADD. Append-only. Answers "when was I paused, and by whom". No audit columns — this IS the audit.
Columns (7)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| CoachClientId | uuid | not null, references CoachClients.Id | CASCADE. |
| FromStatus | text | `CoachClientStatus`. | |
| ToStatus | text | not null | `CoachClientStatus`. |
| ActorUserId | text | references Users.Id | |
| Reason | character varying(2000) | ||
| OccurredAt | timestamp with time zone | not null |
Indexes (1)
(CoachClientId, OccurredAt)(IX_CoachClientStatusEvents_CoachClientId_OccurredAt)
Relationships
CoachClientStatusEvents.CoachClientIdreferencesCoachClients.IdCoachClientStatusEvents.ActorUserIdreferencesUsers.Id