fct_rate_term_payment_frequency_price


Description

Reporting-ready term payment frequency prices with a default organization unit row, age bands (defaulting to 0-199), and optional term or month-day windows. final_price already applies organization unit and age adjustments.

Each row represents a static base price for a given combination of payment frequency, organization unit, age band, and validity window. For dynamic modifications that alter the charge after specific trigger events (calendar date, contract extension, recurring interval, or limited period), see fct_rate_term_payment_frequency_price_adjustment, which shares the same rate_term_payment_frequency_id key.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
rate_term_payment_frequency_price_id varchar 256 null

The primary key of this table. Surrogate key built from the rate term payment frequency dimensions.

rate_term_payment_frequency_id int8 19 null
dim_rate_term_payment_frequency.rate_term_payment_frequency_id fct_rate_term_payment_frequency_price_rate_term_payment_frequency_id_fkey R

The payment frequency configuration the price belongs to.

rate_term_configuration_id int8 19 null
dim_rate_term_configuration.rate_term_configuration_id fct_rate_term_payment_frequency_price_rate_term_configuration_id_fkey R

The rate term configuration that owns the payment frequency.

rate_id int8 19 null
dim_rate.rate_id fct_rate_term_payment_frequency_price_rate_id_fkey R

The rate (tariff) for which this price applies.

organization_unit_id int8 19 null
dim_organization_unit.organization_unit_id fct_rate_term_payment_frequency_price_organization_unit_id_fkey R

The organization unit (gym) where the price applies. Null means the default price across all gyms.

min_age int4 10 null

Minimum age (in years) for the price band. Defaults to 0 when no age band is configured.

max_age int4 10 null

Maximum age (in years) for the price band. Defaults to 199 when no age band is configured.

valid_from_calendar_day date 13 null

Start date of the month-day pricing window. Stored on the year 2000 calendar to represent month/day; null when not month-day based.

valid_to_calendar_day date 13 null

End date of the month-day pricing window. Stored on the year 2000/2001 calendar for wraparound; null when not month-day based.

valid_from_offset_value int4 10 null

Number of time units after the contract start when a term-based price begins.

valid_from_offset_unit varchar 256 null

Time unit used for the term-based offset value.

valid_to_offset_days int4 10 null

Last day (inclusive) when the term-based price applies, counted in days from contract start. Null means no end date.

age_adjustment_price numeric 19,2 null

Absolute price set for the age band when the adjustment type is ABSOLUTE.

age_adjustment_discount numeric 19,2 null

Percentage discount for the age band when the adjustment type is PERCENTAGE, defaulting to 0 when none applies.

final_price numeric 19,2 null

The computed price after organization unit and age adjustments.

last_updated timestamptz 35 null

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

Relationships