MembershipAddOns table
The MembershipAddOns table in the FitStack - V2 schema has 12 columns, keyed by Id, with 3 foreign keys to GymClientSubscriptions, GymProducts and GymProductVariants.
Glossary: Add-on. A locker rental attached to a Membership.
Columns (12)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| MembershipId | uuid | not null, references GymClientSubscriptions.Id | CASCADE. |
| ProductId | uuid | not null, references GymProducts.Id | Kind Rental or Service with a RecurringInterval. |
| VariantId | uuid | not null, references GymProductVariants.Id | |
| PriceCentsSnapshot | integer | not null | |
| StripeSubscriptionItemId | text | An item on the Membership's Stripe subscription, so it bills together. | |
| StartedAt | timestamp with time zone | not null | |
| EndedAt | timestamp with time zone | ||
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (1)
(MembershipId, EndedAt)(IX_MembershipAddOns_MembershipId_EndedAt)
Relationships
MembershipAddOns.MembershipIdreferencesGymClientSubscriptions.IdMembershipAddOns.ProductIdreferencesGymProducts.IdMembershipAddOns.VariantIdreferencesGymProductVariants.Id