MealPlans table

The MealPlans table in the FitStack - V2 schema has 27 columns, keyed by Id, with 2 foreign keys to Users and Programs. 9 columns in Meals, MealPlanCategories, MealPlanDays, MealPlanDayItems and 5 more reference it.

Columns (27)

Columns of the MealPlans table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
UserIdtextnot null, references Users.Id
ProgramIduuidreferences Programs.Id
Slugtextnot null
Nametextnot null
Descriptiontext
CoverImageUrltext
DailyCalorieTargetnumericnot null
DailyProteinTargetnumericnot null
DailyCarbTargetnumericnot null
DailyFatTargetnumericnot null
DailyFiberTargetnumeric
DailyWaterTargetnumeric
MealsPerDayinteger
TargetMealTimestext
ShowSectionTimesbooleannot null
IsPublicbooleannot null
CurrentVersionintegernot null
PriceCentsintegernot null
Currencycharacter varying(3)not null
IsListedbooleannot null
StripeProductIdtext
StripePriceIdtext
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Indexes (1)

  • (Slug) unique (IX_MealPlans_Slug)

Relationships