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 |
|
|
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 |
|
|
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 |
|
|
Ref: see table dim_pricing |
|||||
dim_draw_id | int4 | 10 | √ | null |
|
|
Ref: see table dim_draw |
||||
customer_id | int4 | 10 | √ | null |
|
|
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 |
|
|
Used for date indexing, applied to the date this wager was cancelled (if it was cancelled) |
||||
dim_channel_id | int4 | 10 | √ | null |
|
|
Ref: see table dim_channel |
||||
is_vip | bool | 1 | √ | null |
|
|
|||||
dim_affiliate_id | int4 | 10 | √ | null |
|
|
Ref: see table dim_affiliate |
||||
dim_recurring_purchase_type_id | int4 | 10 | √ | null |
|
|
lookup on dimension table dim_recurring_purchase_type |
||||
ticket_id | int4 | 10 | √ | null |
|
|
Ref: see table ticket_sales |
||||
wager_serial | text | 2147483647 | √ | null |
|
|
|||||
administrator_id | int4 | 10 | √ | null |
|
|
Ref: see table administrator |
||||
dim_organisation_id | int4 | 10 | √ | null |
|
|
Ref: see table dim_organisation |
||||
initial_dim_channel_id | int4 | 10 | √ | null |
|
|
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 |