FitnessPlans table
The FitnessPlans table in the FitStack - V2 schema has 20 columns, keyed by Id, with 1 foreign key to Users. 5 columns in FitnessPlanDays, FitnessPlanMealItems, FitnessPlanWorkoutItems, FitnessPlanEnrollments and 1 more reference it.
Columns (20)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| UserId | text | not null, references Users.Id | |
| Slug | text | not null | |
| Name | text | not null | |
| Description | text | ||
| CoverImageUrl | text | ||
| StartDate | timestamp with time zone | not null | |
| EndDate | timestamp with time zone | ||
| IsActive | boolean | not null | |
| 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_FitnessPlans_Slug)
Relationships
FitnessPlans.UserIdreferencesUsers.IdFitnessPlanDays.FitnessPlanIdreferencesFitnessPlansFitnessPlanMealItems.FitnessPlanIdreferencesFitnessPlansFitnessPlanWorkoutItems.FitnessPlanIdreferencesFitnessPlansFitnessPlanEnrollments.FitnessPlanIdreferencesFitnessPlansFitnessPlanReports.FitnessPlanIdreferencesFitnessPlans