Studios table
The Studios table in the FitStack - V2 schema has 13 columns, keyed by Id, with 1 foreign key to Gyms. 3 columns in Courses, CourseSchedules and Sessions reference it.
Replaces ClassRooms (81). Glossary: Studio; avoid Room, Class Room.
Columns (13)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| GymId | uuid | not null, references Gyms.Id | |
| Name | character varying(200) | not null | Was nullable on ClassRooms; a Studio always has a name. |
| Description | character varying(1000) | ||
| Capacity | integer | not null | |
| OffsiteAddress | text | Set only when the Studio is not at the Gym (a park, a pool). Null = at the Gym's address. | |
| OffsiteCity | text | ||
| OffsiteState | text | ||
| OffsiteZip | text | ||
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (1)
(GymId)(IX_Studios_GymId)
Relationships
Studios.GymIdreferencesGyms.IdCourses.DefaultStudioIdreferencesStudiosCourseSchedules.StudioIdreferencesStudiosSessions.StudioIdreferencesStudios