Trainers table
The Trainers table in the FitStack - V2 schema has 11 columns, keyed by Id, with 1 foreign key to Media. 6 columns in Employees, Coaches, TrainerAbsences, Courses and 2 more reference it.
An Employee who leads Sessions. Replaces GymCoaches (80), which required an approved Coach.
Columns (11)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| EmployeeId | uuid | not null | One trainer profile per Employee. |
| CoachId | uuid | Optional link to the Employee's FitStack Coach profile (60). Grants no data access either way. | |
| Bio | character varying(4000) | ||
| PhotoMediaId | uuid | references Media.Id | |
| Specialties | text[] | not null | |
| IsListed | boolean | not null | Shown on the Site's Trainers page. |
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (1)
(EmployeeId)unique (IX_Trainers_EmployeeId)
Relationships
Trainers.PhotoMediaIdreferencesMedia.IdEmployees.IdreferencesTrainersCoaches.IdreferencesTrainersTrainerAbsences.TrainerIdreferencesTrainersCourses.DefaultTrainerIdreferencesTrainersCourseSchedules.TrainerIdreferencesTrainersSessions.TrainerIdreferencesTrainers