GymProducts table
The GymProducts table in the FitStack - V2 schema has 16 columns, keyed by Id, with 2 foreign keys to Companies and Gyms. 3 columns in GymProductImages, GymProductVariants and MembershipAddOns reference it.
Glossary: Gym Product; never "Product" on its own in FitStack Gym copy.
Columns (16)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| CompanyId | uuid | not null, references Companies.Id | |
| GymId | uuid | references Gyms.Id | Null = sold at every Gym. |
| Name | character varying(200) | not null | |
| Description | character varying(4000) | ||
| Kind | text | not null | `GymProductKind`. |
| Category | character varying(100) | ||
| TaxCode | character varying(50) | Stripe Tax product tax code, e.g. txcd_99999999. | |
| IsListed | boolean | not null | Shown in the app and on the Site. Unlisted = desk only. |
| RecurringInterval | text | `MembershipInterval` (82) when the product renews as an Add-on; null for one-off. | |
| StripeProductId | text | On the Company's connected account. | |
| Status | text | not null | `GymProductStatus`. |
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (1)
(CompanyId, Status, IsListed)(IX_GymProducts_CompanyId_Status_IsListed)
Relationships
GymProducts.CompanyIdreferencesCompanies.IdGymProducts.GymIdreferencesGyms.IdGymProductImages.ProductIdreferencesGymProductsGymProductVariants.ProductIdreferencesGymProductsMembershipAddOns.ProductIdreferencesGymProducts