Adds a master table for guest products price plans

This commit is contained in:
uri 2025-03-17 16:35:50 +01:00
parent b518c536f2
commit cba4b97082
3 changed files with 249 additions and 0 deletions

View file

@ -5914,3 +5914,173 @@ models:
description: |
Date of when the guest product display name started
to be in use. This is purely for information purposes.
- name: int_core__guest_product_price_plans
description: |
Master table of Pricing for Guest Products.
Contains the information of the guest product, whether if it corresponds
to a default pricing or a custom pricing for a given host and
whether the product itself is currently available and if it is available
for Guest Journey purposes or not. For each case, a specific product price
and protection limit is displayed for all working currencies.
Historical price plans are also reflected here, so keep this in mind
when querying this model.
columns:
- name: id_guest_product_configuration_price_plan
data_type: bigint
description: |
Unique identifier of the guest product configuration price plan.
Acts as the primary key for this table.
data_tests:
- not_null
- unique
- name: guest_product_name
data_type: character varying
description: |
Internal name of the guest product. This is the
name used in internal configurations within our
systems. Only a single guest product name can exist
for a given product, opposite to the guest product display
name.
Recommended for building dedicated guest product logic.
It cannot be null.
data_tests:
- not_null
- name: guest_product_latest_display_name
data_type: character varying
description: |
Latest display name of the guest product. This is the
commercial or client-facing name.
If multiple commercial names exist for a given guest
product, then only the last one is available.
Recommended for reporting purposes.
It cannot be null.
data_tests:
- not_null
- name: configuration_level
data_type: string
description: |
Level of the configuration. It can correspond to
an account-based configuration (custom) or the
default configuration.
It cannot be null.
data_tests:
- not_null
- accepted_values:
values:
- DEFAULT
- ACCOUNT
- name: id_user_host
data_type: text
description: |
Id of the user that acts as Host.
This field can be null if the configuration is the
default configuration. If it's set, it means this
configuration is a custom configuration.
- name: is_currently_enabled
data_type: boolean
description: |
Indicates if the product is currently enabled or not.
- If true, then the product is visible everywhere.
- If false, then the product is disabled. Therefore,
the product is NOT visible anywhere.
It cannot be null.
data_tests:
- not_null
- name: is_currently_enabled_for_guest_journey
data_type: boolean
description: |
Indicates if the product, for a given user, is currently
enabled for the guest journey.
- If true, then the product is visible in the guest journey.
It cannot be null.
data_tests:
- not_null
- name: currency_code
data_type: text
description:
Currency iso4217 code. It identifies the currency for the amount stated in
product_price_in_local_currency and protection_limit_in_local_currency.
It cannot be null.
data_tests:
- not_null
- name: product_price_in_local_currency
data_type: numeric
description: |
Price of the guest product in local currency.
data_tests:
- not_null
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: true
- name: protection_limit_in_local_currency
data_type: numeric
description: |
Protection limit in local currency, or covered amount.
data_tests:
- not_null
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: true
- name: starts_at_utc
data_type: timestamp
description: |
Timestamp of when this configuration price plan starts.
data_tests:
- not_null
- name: start_date_utc
data_type: date
description: |
Date of when this configuration price plan starts.
data_tests:
- not_null
- name: is_latest_price_plan
data_type: boolean
description: |
If true, it means this is the latest price plan for a given
configuration. If false, then this is an historical price plan
that has been overriden with a new plan.
It cannot be null.
data_tests:
- not_null
- name: created_at_utc
data_type: timestamp
description: |
Timestamp of when this record was created.
data_tests:
- not_null
- name: created_date_utc
data_type: date
description: |
Date of when this record was created.
data_tests:
- not_null
- name: updated_at_utc
data_type: timestamp
description: |
Timestamp of when this record was last updated.
data_tests:
- not_null
- name: updated_date_utc
data_type: date
description: |
Date of when this record was last updated.
data_tests:
- not_null