GymProductVariants table

The GymProductVariants table in the FitStack - V2 schema has 13 columns, keyed by Id, with 1 foreign key to GymProducts. 3 columns in GymStock, OrderLines and MembershipAddOns reference it.

Columns (13)

Columns of the GymProductVariants table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
ProductIduuidnot null, references GymProducts.IdCASCADE.
Namecharacter varying(200)not nulle.g. "M / Black". A product with no options has one Variant named like the product.
Skucharacter varying(100)
PriceCentsintegernot null
Currencycharacter varying(3)not null
OptionsJsonjsonb{"size":"M","colour":"Black"}
StripePriceIdtext
IsActivebooleannot null
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Indexes (2)

  • (ProductId) (IX_GymProductVariants_ProductId)
  • (Sku) unique (IX_GymProductVariants_Sku)

Relationships