prize

-1 rows


Description

For commercial lotteries. Table represents ticket prizes

Columns

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

Draw this prize applies to

entry_count int8 19 null

Number of entries on the wager that applies to this prize

wager_serial text 2147483647 null

Serial number for the wager this prize applies to

prize_amount numeric 15,2 null

Value of the prize

prize_tax numeric 15,2 null

Tax applied to this prize

prize_commission numeric 15,2 null

Commission earned on this prize

wager_status_id int2 5 null

Status of the wager this prize applies to

prize_free_games int8 19 null

Number of free games won with this prize (some lotteries only)

prize_claimed bool 1 null

Has this prize been claimed?

prize_paid_by_provider bool 1 null

Is the prize paid by the lottery provider?

dim_date_id int4 10 null
dim_date.dim_date_id Implied Constraint R

Used for date indexing, applied to when this record was created (see table: dim_date)

dim_provider_id int4 10 null
provider.provider_id Implied Constraint R

Ref: see table dim_provider

dim_entry_offer_id int4 10 null

Ref: see table dim_entry_offer

dim_lottery_id int4 10 null
dim_lottery.dim_lottery_id Implied Constraint R

Ref: see table dim_lottery

prize_locked_until timestamptz 35,6 null

Date this prize becomes available for withdrawal by the customer

ticket_wager_prize_timestamp timestamptz 35,6 null

Timestamp the prize record was created/updated

Indexes

Constraint Name Type Sort Column(s)
idx_lottery_id_tk Performance Asc dim_lottery_id
idx_prize_amount_tk Performance Asc prize_amount
idx_prize_dim_date_id_tk Performance Asc dim_date_id
idx_prize_dim_entry_offer_id_tk Performance Asc dim_entry_offer_id
idx_prize_dim_provider_id_tk Performance Asc dim_provider_id
idx_prize_prize_locked_until_tk Performance Asc prize_locked_until
idx_prize_wager_serial_tk Performance Asc wager_serial

Relationships