Classes table
The Classes table in the FitStack - V2 schema has 8 columns, keyed by Id, with 2 foreign keys to ClassRooms and GymCoaches. 3 columns in ClassCodes, ClassAttendees and ClassPrices reference it.
Taught by a GymCoach, so a class always resolves to a real Coach (60).
Columns (8)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| ClassRoomId | uuid | not null, references ClassRooms.Id | |
| GymCoachId | uuid | not null, references GymCoaches.Id | |
| Name | text | not null | CORRECTED: the Gym board typed this column as `uuid`, which was a slip. |
| Capacity | integer | Overrides ClassRooms.Capacity when set. | |
| Start | timestamp with time zone | not null | |
| End | timestamp with time zone | not null | |
| ExternalPrice | numeric(8,2) | Drop-in price for non-members. |
Relationships
Classes.ClassRoomIdreferencesClassRooms.IdClasses.GymCoachIdreferencesGymCoaches.IdClassCodes.ClassIdreferencesClassesClassAttendees.ClassIdreferencesClassesClassPrices.ClassIdreferencesClasses