dim_product


Description

Products sold at gyms, including both catalog products (pre-defined with variants like size, duration) and dynamic products (created ad-hoc during sale with minimal attributes). Covers physical merchandise, virtual services, vouchers, and consumption credits.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
product_id varchar 256 null
bridge_product_to_organization_unit.product_id Implied Constraint R
dim_purchased_contingent.product_id Implied Constraint R
fct_revenue.product_id Implied Constraint R
fct_revenue_cash_based.product_id Implied Constraint R

Unique identifier for the product. For catalog products, derived from the product variant; for dynamic products, generated from the gym location and item number.

type varchar 256 null

Product category that determines how it’s used and sold: * MATERIAL: Physical merchandise that can be purchased in-store (drinks, protein bars, gym equipment, apparel) * VIRTUAL: Virtual products linked to benefits or services (class fees, personal training sessions, facility access) * VOUCHER: Gift cards that can be redeemed for contracts or physical products * CONTRACT_VOUCHER: Special vouchers that enable use of a specific membership contract for a time period * CONSUMPTION_CREDIT: Pre-paid credit balance customers can use to purchase physical products * UNKNOWN: Type not specified (only for dynamic products created during sale)

variant_name varchar 256 null

Specific variant specification of the product such as size, duration, or quantity (e.g., ‘1 Liter’, ‘20 minutes’, ‘10-pack’). Set to UNKNOWN for dynamic products.

item_number varchar 256 null

Human-readable product identifier used for inventory tracking and point-of-sale systems. Cleared when product is archived to allow reuse.

archived bool 1 null

Whether this product has been retired and is no longer available for new sales. Archived products are retained for historical transaction records. Dynamic products cannot be archived.

name varchar 256 null

Display name of the product shown to customers and staff (e.g., ‘Protein Shake’, ‘Day Pass’, ‘Locker Rental’).

class_of_goods varchar 256 null

Product classification for accounting, reporting, and inventory management purposes (e.g., beverages, supplements, services, vouchers). Set to UNKNOWN for dynamic products.

list_price numeric 19,2 null

Standard selling price for the product as defined in the product catalog. For dynamic products, reflects the price recorded at the time of sale.

currency_code varchar 256 null

ISO 4217 currency code for the list price (e.g., ‘EUR’, ‘USD’, ‘CHF’). For dynamic products, reflects the currency recorded at the time of sale.

usage_count int4 10 null

Number of uses or sessions included in the product purchase (e.g., 10 for a 10-visit pass). NULL for products without usage tracking.

validity_type varchar 256 null

How the product’s validity period is calculated: ONE_TIME (single use), DAY (valid until end of day), or PERIOD (valid for specific duration). NULL for products without time restrictions.

validity_term_value int4 10 null

Numeric portion of the validity duration (e.g., 3 for ‘3 months’). Combined with validity_term_unit. NULL for products without validity periods.

validity_term_unit varchar 256 null

Time unit for validity duration: DAY, WEEK, MONTH, or YEAR. Combined with validity_term_value. NULL for products without validity periods.

expiry_term int4 10 null

Numeric portion of the expiration period after which the product can no longer be used (e.g., 12 for ‘expires after 12 months’). Combined with expiry_term_unit. NULL for non-expiring products.

expiry_term_unit varchar 256 null

Time unit for expiration period: DAY, WEEK, MONTH, or YEAR. Combined with expiry_term. NULL for non-expiring products.

service_id int8 19 null
dim_service.service_id Implied Constraint R

The service (benefit) associated with this product. Applies primarily to VIRTUAL products that represent bookable services like classes, personal training sessions, or facility access. NULL for physical merchandise, vouchers, and dynamic products.

last_updated timestamptz 35 null

System column. UTC Timestamp at which entry was calculated (lags shortly behind source system).

Relationships