Programs table
The Programs table in the FitStack - V2 schema has 24 columns, keyed by Id, with 1 foreign key to Users. 7 columns in Workouts, ProgramWeeks, ProgramTags, ProgramRatings and 3 more reference it.
Columns (24)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| Name | text | not null | |
| Description | text | not null | |
| Slug | text | not null | |
| CreatedById | text | not null, references Users.Id | |
| ProgramType | integer | not null | |
| DifficultyLevel | integer | not null | |
| WeekCount | integer | not null | |
| SessionsPerWeek | integer | not null | |
| CoverImageUrl | text | ||
| Notes | text | ||
| RequiredEquipment | text | ||
| Prerequisites | text | ||
| IsPublic | boolean | not null | |
| CurrentVersion | integer | not null | |
| PriceCents | integer | not null | |
| Currency | character varying(3) | not null | |
| IsListed | boolean | not null | |
| StripeProductId | text | ||
| StripePriceId | text | ||
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (1)
(Slug)unique (IX_Programs_Slug)
Relationships
Programs.CreatedByIdreferencesUsers.IdWorkouts.ProgramIdreferencesProgramsProgramWeeks.ProgramIdreferencesProgramsProgramTags.ProgramIdreferencesProgramsProgramRatings.ProgramIdreferencesProgramsProgramReports.ProgramIdreferencesProgramsProgramEnrollments.ProgramIdreferencesProgramsMealPlans.ProgramIdreferencesPrograms