Gyms table
The Gyms table in the FitStack - V2 schema has 12 columns, keyed by Id, with 2 foreign keys to Companies and Employees. 18 columns in Studios, Courses, Sessions, GymZones and 14 more reference it.
Columns (12)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| CompanyId | uuid | not null, references Companies.Id | |
| ManagerId | uuid | not null, references Employees.Id | |
| Name | text | not null | |
| Address | text | not null | |
| City | text | not null | |
| State | text | not null | |
| Zip | text | not null | |
| Latitude | numeric(11,8) | Geocoded from the address. | |
| Longitude | numeric(11,8) | Geocoded from the address. | |
| GeofencingDistance | numeric(8,2) | Metres. Auto-checkout radius — UI collects miles/feet and converts. | |
| Timezone | text | not null | IANA format, e.g. America/Chicago. |
Relationships
Gyms.CompanyIdreferencesCompanies.IdGyms.ManagerIdreferencesEmployees.IdStudios.GymIdreferencesGymsCourses.GymIdreferencesGymsSessions.GymIdreferencesGymsGymZones.GymIdreferencesGymsGymEquipmentUnits.GymIdreferencesGymsGymEquipmentReports.GymIdreferencesGymsGymProducts.GymIdreferencesGymsGymStock.GymIdreferencesGymsOrders.GymIdreferencesGymsStripeTerminalReaders.GymIdreferencesGymsGymHours.GymIdreferencesGymsGymCoaches.GymIdreferencesGymsGymClients.GymIdreferencesGymsGymReviews.GymIdreferencesGymsGymSocialTags.GymIdreferencesGymsGymEquipment.GymIdreferencesGymsClassRooms.GymIdreferencesGymsGymSubscriptions.GymIdreferencesGyms