MealPlanEnrollments table
The MealPlanEnrollments table in the FitStack - V2 schema has 10 columns, keyed by Id, with 2 foreign keys to MealPlans and Users.
v1 coaching added `AssignedByCoachId` + `AssignedAt` here. v2 REMOVES both — see CoachAssignments (63).
Columns (10)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| MealPlanId | uuid | not null, references MealPlans.Id | |
| UserId | text | not null, references Users.Id | |
| StartDate | timestamp with time zone | not null | |
| EndDate | timestamp with time zone | ||
| IsActive | boolean | not null | |
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (1)
(UserId, MealPlanId)unique (IX_MealPlanEnrollments_UserId_MealPlanId)
Relationships
MealPlanEnrollments.MealPlanIdreferencesMealPlans.IdMealPlanEnrollments.UserIdreferencesUsers.Id