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 |
|
|
Ref: many-to-one to table customer |
||||
| ticket_id | int4 | 10 | √ | null |
|
|
Ref: to ticket_sales |
||||
| dim_lottery_id | int4 | 10 | √ | null |
|
|
Ref: see table dim_lottery |
||||
| entry_count | int4 | 10 | √ | null |
|
|
How many entries apply to the ticket |
||||
| dim_entry_offer_id | int8 | 19 | √ | null |
|
|
Ref: see table dim_entry_offer |
||||
| dim_division_id | int4 | 10 | √ | null |
|
|
Ref: see table dim_entry_offer |
||||
| division_dividend | numeric | 14,2 | √ | null |
|
|
Value of this dividend |
||||
| dim_date_id | int4 | 10 | √ | null |
|
|
Used for date indexing, applied to the date this dividend was created |
||||
| paid_by_provider | bool | 1 | √ | null |
|
|
Was this to be paid out by the provider? |
||||
| account_transaction_id | int8 | 19 | √ | null |
|
|
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 |



