Companies table
The Companies table in the FitStack - V2 schema has 3 columns, keyed by Id, with 2 foreign keys to Sites and Users. 4 columns in GymProducts, Orders, Employees and Gyms reference it.
A gym chain. One company owns many gyms.
Columns (3)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null, references Sites.CompanyId | |
| Name | text | not null | |
| OwnerId | text | not null, references Users.Id |
Relationships
Companies.IdreferencesSites.CompanyIdCompanies.OwnerIdreferencesUsers.IdGymProducts.CompanyIdreferencesCompaniesOrders.CompanyIdreferencesCompaniesEmployees.CompanyIdreferencesCompaniesGyms.CompanyIdreferencesCompanies