ticket_dividend

-1 rows


Description

For commercial lotteries. Table represents ticket dividends

Columns

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

Draw number this dividend applies to (see also dim_draw)

customer_id int4 10 null
customer.customer_id ticket_dividend_customer_id_fkey R

Ref: many-to-one to table customer

ticket_id int4 10 null
ticket_sales.ticket_id ticket_dividend_ticket_id_fkey R

Ref: to ticket_sales

dim_lottery_id int4 10 null
dim_lottery.dim_lottery_id ticket_dividend_dim_lottery_id_fkey R

Ref: see table dim_lottery

entry_count int4 10 null

How many entries apply to the ticket

dim_entry_offer_id int8 19 null
dim_entry_offer.dim_entry_offer_id ticket_dividend_dim_entry_offer_id_fkey R

Ref: see table dim_entry_offer

dim_division_id int4 10 null
dim_division.dim_division_id ticket_dividend_dim_division_id_fkey R

Ref: see table dim_entry_offer

division_dividend numeric 14,2 null

Value of this dividend

dim_date_id int4 10 null
dim_date.dim_date_id ticket_dividend_dim_date_id_fkey R

Used for date indexing, applied to the date this dividend was created

bool 1 null

Was this to be paid out by the provider?

account_transaction_id int8 19 null
account_transaction.account_transaction_id ticket_dividend_account_transaction_id_fkey R

Ref: the payout transaction in account_transaction

Indexes

Constraint Name Type Sort Column(s)
idx_ticket_dividend_account_transaction_id Performance Asc account_transaction_id
idx_ticket_dividend_customer_id Performance Asc customer_id
idx_ticket_dividend_dim_date_id Performance Asc dim_date_id
idx_ticket_dividend_dim_division_id Performance Asc dim_division_id
idx_ticket_dividend_dim_entry_offer_id Performance Asc dim_entry_offer_id
idx_ticket_dividend_dim_lottery_id Performance Asc dim_lottery_id
idx_ticket_dividend_draw_no Performance Asc draw_no
idx_ticket_dividend_paid_by_provider Performance Asc paid_by_provider

Relationships