Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| account_transaction_id | int8 | 19 | null |
|
|
Primary key: an identifier for this record |
||||||||||||||||||
| account_transaction_type_name | text | 2147483647 | √ | null |
|
|
What kind of transaction this was: withdrawal|deposit|purchase_ticket|purchase_syndicate|reversal| |
|||||||||||||||||
| transaction_amount | numeric | 17,2 | √ | null |
|
|
How much the transaction was. Negative amounts indicate money out of a customer balance |
|||||||||||||||||
| customer_id | int4 | 10 | √ | null |
|
|
Ref: many-to-one to customer |
|||||||||||||||||
| is_reversal | bool | 1 | √ | null |
|
|
Was this transaction a reversal of a previous transaction of the same kind? |
|||||||||||||||||
| dim_lottery_id | int4 | 10 | √ | null |
|
|
Which lottery (if any) did this transaction apply to? |
|||||||||||||||||
| dim_transfer_method_id | int4 | 10 | √ | null |
|
|
See table dim_transfer_method |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| account_transaction_pkey | Primary key | Asc | account_transaction_id |
| idx_account_transaction_dim_lottery_id | Performance | Asc | dim_lottery_id |
| idx_account_transaction_dim_transfer_method_id | Performance | Asc | dim_transfer_method_id |



