wager

-1 rows


Description

Table represent the wager numbers and wager/purchase information of each ticket

Columns

Column Type Size Nulls Auto Default Children Parents Comments
wager_id int8 19 null

Primary key: an identifier for this record

entry_count int4 10 null

How many entries are included in this wager

dim_lottery_id int4 10 null
dim_lottery.dim_lottery_id wager_dim_lottery_id_fkey R

Ref: see table dim_lottery

wager_purchased_on timestamptz 35,6 null

When this wager was initially purchased

wager_cost numeric 15,5 null

How much this wager cost

wager_commission numeric 15,5 null

How much commission was made on this wager

wager_slip_fee numeric 15,5 null

Deprecated: the ‘flagfall’ charged for the wager

dim_provider_id int4 10 null
dim_provider.dim_provider_id wager_dim_provider_id_fkey R

Ref: see table dim_provider

updated timestamptz 35,6 null

Last time this record was updated

wager_status_id int4 10 null

10: purchased; 20: cancelled

is_syndicate bool 1 null

Is this wager part of a syndicate purchase?

dim_pricing_id int4 10 null
dim_pricing.dim_pricing_id wager_dim_pricing_id_fkey R

Ref: see table dim_pricing

dim_draw_id int4 10 null
dim_draw.dim_draw_id wager_dim_draw_id_fkey R

Ref: see table dim_draw

customer_id int4 10 null
customer.customer_id wager_customer_id_fkey R

Ref: many-to-one to customer

entry_numbers text 2147483647 null

For Raffle, the ticket numbers purchased. For Lottery, the game numbers.

cancelled_dim_date_id int4 10 null
dim_draw.dim_draw_id wager_dim_date_id_fkey R

Used for date indexing, applied to the date this wager was cancelled (if it was cancelled)

dim_channel_id int4 10 null
dim_channel.dim_channel_id wager_dim_channel_id_fkey R

Ref: see table dim_channel

is_vip bool 1 null
dim_affiliate_id int4 10 null
dim_affiliate.dim_affiliate_id wager_dim_affiliate_id_fkey R

Ref: see table dim_affiliate

dim_recurring_purchase_type_id int4 10 null
dim_recurring_purchase_type.dim_recurring_purchase_type_id wager_dim_recurring_purchase_type_id_fkey R

lookup on dimension table dim_recurring_purchase_type

ticket_id int4 10 null
ticket_sales.ticket_id wager_ticket_id_fkey R

Ref: see table ticket_sales

wager_serial text 2147483647 null
administrator_id int4 10 null
administrator.administrator_id wager_administrator_id_fkey R

Ref: see table administrator

dim_organisation_id int4 10 null
dim_organisation.dim_organisation_id wager_dim_organisation_id_fkey R

Ref: see table dim_organisation

initial_dim_channel_id int4 10 null
dim_channel.dim_channel_id Implied Constraint R

Indexes

Constraint Name Type Sort Column(s)
wager_pkey Primary key Asc wager_id
idx_wager_administrator_id Performance Asc administrator_id
idx_wager_cancelled_dim_date_id Performance Asc cancelled_dim_date_id
idx_wager_dim_affiliate_id Performance Asc dim_affiliate_id
idx_wager_dim_channel_id Performance Asc dim_channel_id
idx_wager_dim_draw_id_tk Performance Asc dim_draw_id
idx_wager_dim_organisation_id Performance Asc dim_organisation_id
idx_wager_dim_pricing_id_tk Performance Asc dim_pricing_id
idx_wager_dim_recurring_purchase_type_id Performance Asc dim_recurring_purchase_type_id
idx_wager_initial_dim_channel_id Performance Asc initial_dim_channel_id
idx_wager_is_vip Performance Asc is_vip
idx_wager_lottery_id_tk Performance Asc dim_lottery_id
idx_wager_provider_id_tk Performance Asc dim_provider_id
idx_wager_ticket_id Performance Asc ticket_id

Relationships