WorkoutSessions table
The WorkoutSessions table in the FitStack - V2 schema has 18 columns, keyed by Id, with 3 foreign keys to Workouts, Users and ScheduledItems. 7 columns in WorkoutLogs, CardioLogs, ExerciseProgresses, CardioProgresses and 3 more reference it.
Columns (18)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| WorkoutId | uuid | references Workouts.Id | |
| HostId | text | not null, references Users.Id | |
| ScheduledItemId | uuid | references ScheduledItems.Id | |
| LeaderboardId | uuid | not null | |
| SessionName | text | ||
| SessionDescription | text | ||
| Status | integer | not null | `WorkoutStatus`. |
| IsPublic | boolean | not null | |
| StartedAt | timestamp with time zone | ||
| CompletedAt | timestamp with time zone | ||
| PausedAt | timestamp with time zone | ||
| LastActivityAt | timestamp with time zone | ||
| AccumulatedPausedSeconds | integer | not null | |
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Relationships
WorkoutSessions.WorkoutIdreferencesWorkouts.IdWorkoutSessions.HostIdreferencesUsers.IdWorkoutSessions.ScheduledItemIdreferencesScheduledItems.IdWorkoutLogs.WorkoutSessionIdreferencesWorkoutSessionsCardioLogs.WorkoutSessionIdreferencesWorkoutSessionsExerciseProgresses.WorkoutSessionIdreferencesWorkoutSessionsCardioProgresses.WorkoutSessionIdreferencesWorkoutSessionsWorkoutSessionLeaderboards.IdreferencesWorkoutSessionsWorkoutSessionParticipants.SessionIdreferencesWorkoutSessionsWorkoutSessionInvitations.WorkoutSessionIdreferencesWorkoutSessions