Meals table

The Meals table in the FitStack - V2 schema has 30 columns, keyed by Id, with 4 foreign keys to MealEmbeddings, Users, MealPlans and Recipes. 6 columns in MealRatings, MealLogs, MealPlanDayItems, NutritionLogs and 2 more reference it.

Columns (30)

Columns of the Meals table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null, references MealEmbeddings.EntityId
UserIdtextnot null, references Users.Id
MealPlanIduuidreferences MealPlans.Id
RecipeIduuidreferences Recipes.Id
Slugtextnot null
Nametextnot null
Descriptiontext
Instructionstext
ImageUrltext
MealTypeintegernot null
ConsumedAttimestamp with time zonenot null
ServingSizetext
TotalCaloriesnumericnot null
TotalProteinnumericnot null
TotalCarbohydratesnumericnot null
TotalFatnumericnot null
TotalFibernumeric
TotalSugarnumeric
IsPublicbooleannot null
IsDraftbooleannot null
Notestext
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_Meals_Slug)

Relationships