ticket_sales

-1 rows


Description

Table represents ticket sales of customers

Columns

Column Type Size Nulls Auto Default Children Parents Comments
checkout_id int4 10 null

Deprecated

lottery_names text 2147483647 null

Lotteries this sale applies to

lottery_type_name text 2147483647 null

Type of lottery this sale applies to

game_offer_names text 2147483647 null

Name of the game offers which apply to this lottery

is_autoplay bool 1 null

Was this purchase an autoplay?

is_vip bool 1 null

Was this purchase a VIP purchase (subscription)?

sales numeric 15,5 null

Cost of this purchase

ticket_id int4 10 null
customer_action.ticket_id Implied Constraint R
migrated_and_current_ticket_sales.ticket_id Implied Constraint R
ticket_dividend.ticket_id ticket_dividend_ticket_id_fkey R
ticket_status_history.ticket_id ticket_status_history_ticket_id_fkey R
wager.ticket_id wager_ticket_id_fkey R
wager_cancelled.ticket_id wager_cancelled_ticket_id_fkey R

Primary key: an identifier for this record

related_product_count int4 10 null

How many related products are included in this purchase

entry_count int8 19 null

How many entries are in this purchase

dim_pricing_id int4 10 null
dim_pricing.dim_pricing_id ticket_sales_dim_pricing_id_fkey R

Ref: see table dim_pricing

customer_id int4 10 null
customer.customer_id ticket_sales_customer_id_fkey R

Ref: many-to-one to customer

dim_draw_id int4 10 null
dim_draw.dim_draw_id ticket_sales_dim_draw_id_fkey R

Ref: see table dim_draw

checkout_encoded_id text 2147483647 null

External reference to the checkout in which this purchase was made

recurring_purchase_id int4 10 null
recurring_purchase.recurring_purchase_id ticket_sales_recurring_purchase_id_fkey R

Ref: recurring_purchase (may be NULL if no recurring purchase applies)

equivalent_standard_games_count int4 10 null

Number of equivalent standard games, e.g. 2 x System 10 = 240 standard games

number_of_games int4 10 null

Number of games played on the ticket

dim_cause_id int4 10 null
dim_cause.dim_cause_id ticket_sales_dim_cause_id_fkey R
sales_data json 2147483647 null

Offline sales extra_fields meta data information

scheduled_purchase_id int4 10 null
scheduled_purchase.scheduled_purchase_id ticket_sales_scheduled_purchase_id_fkey R

Indexes

Constraint Name Type Sort Column(s)
ticket_sales_pkey Primary key Asc ticket_id
idx_ticket_sales_checkout_id_tk Performance Asc checkout_id
idx_ticket_sales_customer_id_tk Performance Asc customer_id
idx_ticket_sales_dim_cause_id Performance Asc dim_cause_id
idx_ticket_sales_dim_draw_id_tk Performance Asc dim_draw_id
idx_ticket_sales_dim_lottery_names_tk Performance Asc lottery_names
idx_ticket_sales_dim_pricing_id_tk Performance Asc dim_pricing_id
idx_ticket_sales_is_autoplay_tk Performance Asc is_autoplay
idx_ticket_sales_is_vip_tk Performance Asc is_vip
idx_ticket_sales_recurring_purchase_id_tk Performance Asc recurring_purchase_id
idx_ticket_sales_scheduled_purchase_id Performance Asc scheduled_purchase_id

Relationships