DB schema for online platform BI integrations
Documentation for core database schema that is exposed via for BI integration.
List of data tables
BI schema has the following data tables:
Table | Description |
---|---|
user | List of user accounts |
wallet | List of user account wallets with current balances |
deposit | List of money transfer operations to the platform |
withdrawal | List of money transfer operations out of the platform |
slip | List of betting slips |
bet | List bets (single slip can contain multiple bets) |
bet_leg | List of bet legs (multi-leg accumulator bets contain more than one bet leg per bet) |
product | List of supported products in the betting platform (example, sports betting, horce racing) |
user table
Field | Description |
---|---|
user_id | Numeric ID, unique account identifier. |
display_name | Full name of the punter. |
email | Email address associated with the account. |
phone | Mobile phone associated with the account. |
date_of_birth | Date of birth of the account owner. |
registration_time | Time when account was created. |
registration_finish_time | Time when account creation were finalized. |
last_login_finish_time | Lats time when account were used. |
last_login_finish_time | Lats time when deposit operation was performed with this account. |
incomeaccess_btag | A BTAG value if user registered by an affiliate via Income Access. |
disabled | Set to true 1 if account is suspended, 0 otherwise. |
wallet table
Field | Description |
---|---|
wallet_uuid | Unique wallet ID. |
user_id | Reference to the user table. |
currency_code | Wallet currency ISO 4217 code. |
balance | Current wallet balance. |
promo_balance | Balance of promo cash. |
type | Wallet type, possible values are regular for real cash wallet or bonus for bonus campaign wallets. |
deposit table
Field | Description |
---|---|
deposit_uuid | Unique deposit transaction ID. |
user_id | Reference to user table. |
wallet_uuid | Reference to wallet table. |
currency_code | Transaction currency ISO 4217 code. |
amount | Amount of money in the transaction. |
gateway | Payments gateway used to process this transaction. |
state | Transaction state. Enum field.n - neww - waitingv - verifieda - approvedr - rejectedc - cancelled |
create_time | Time when transaction was created. |
process_time | Time when transaction was processed. |
withdrawal table
Field | Description |
---|---|
withdrawal_uuid | Unique withdrawal transaction ID. |
user_id | Reference to user table. |
wallet_uuid | Reference to wallet table. |
currency_code | Transaction currency ISO 4217 code. |
amount | Amount of money in the transaction. |
gateway | Payments gateway used to process this transaction. |
state | Transaction state. Enum field.n - neww - waitingv - verifieda - approvedr - rejectedc - cancelled |
create_time | Time when transaction was created. |
process_time | Time when transaction was processed. |
slip table
Field | Description |
---|---|
user_id | Reference to user table. |
currency_code | Slip currency ISO 4217 code. |
slip_uuid | Unique slip ID. |
slip_id | Numeric unique Slip ID. |
slip_state | Slip state. Enum field.n - new betting slipW - winner paid-outL - loserR - revoked paid-outK - expired or forced loser slip |
slip_revoked | True if slip is marked as revoked. |
slip_issue_time | Time when slip was purchased/issued (main index for time based filtering) |
slip_resolve_time | Time when slip was initially resulted (slip might be re-resulted later of event result changes). |
slip_payout_time | Time when slip was paid-out. |
slip_price_total | Total amount of money paid for the slip. |
slip_promo_used | Amount of promo cash used for this slip. |
slip_paid_out | Amount of money paid-out to the punters wallet for this slip. |
slip_paid_out_promo | Amount of promo cash paid-out to the punters wallet for this slip. |
slip_win_total | Total amount of money won by this slip. |
bet table
Field | Description |
---|---|
user_id | Reference to user table. |
currency_code | Slip currency ISO 4217 code. |
slip_uuid | Unique slip ID. |
slip_id | Numeric unique Slip ID. |
slip_state | Slip state. Enum field.n - new betting slipW - winner paid-outL - loserR - revoked paid-outK - expired or forced loser slip |
slip_revoked | True if slip is marked as revoked. |
slip_issue_time | Time when slip was purchased/issued (main index for time based filtering) |
slip_resolve_time | Time when slip was initially resulted (slip might be re-resulted later of event result changes). |
slip_payout_time | Time when slip was paid-out. |
slip_price_total | Total amount of money paid for the slip. |
slip_promo_used | Amount of promo cash used for this slip. |
slip_paid_out | Amount of money paid-out to the punters wallet for this slip. |
slip_paid_out_promo | Amount of promo cash paid-out to the punters wallet for this slip. |
slip_win_total | Total amount of money won by this slip. |
bet_stake | Stake for this bet |
bet_current_odds | Current odds for this bet (might not match initial odds, for example in dead-heat situations, keno game) |
bet_issued_odds | Initial odds when bet was placed |
bet_bonus_multiplier | Multi-leg accumulator bonus multiplier |
bet_penalty_multiplier | Early-payout penalty multiplier |
bet_state | Bet state 1 - active 2 - won 3 - lost 4 - cancelled |
event_product_id | Product ID (Aardvark internal) |
bet_leg table
Field | Description |
---|---|
user_id | Reference to user table. |
currency_code | Slip currency ISO 4217 code. |
slip_uuid | Unique slip ID. |
slip_id | Numeric unique Slip ID. |
slip_state | Slip state. Enum field.n - new betting slipW - winner paid-outL - loserR - revoked paid-outK - expired or forced loser slip |
slip_revoked | True if slip is marked as revoked. |
slip_issue_time | Time when slip was purchased/issued (main index for time based filtering) |
slip_resolve_time | Time when slip was initially resulted (slip might be re-resulted later of event result changes). |
slip_payout_time | Time when slip was paid-out. |
slip_price_total | Total amount of money paid for the slip. |
slip_promo_used | Amount of promo cash used for this slip. |
slip_paid_out | Amount of money paid-out to the punters wallet for this slip. |
slip_paid_out_promo | Amount of promo cash paid-out to the punters wallet for this slip. |
slip_win_total | Total amount of money won by this slip. |
bet_stake | Stake for this bet |
bet_current_odds | Current odds for this bet (might not match initial odds, for example in dead-heat situations, keno game) |
bet_issued_odds | Initial odds when bet was placed |
bet_bonus_multiplier | Multi-leg accumulator bonus multiplier |
bet_penalty_multiplier | Early-payout penalty multiplier |
bet_state | Bet state 1 - active 2 - won 3 - lost 4 - cancelled |
bet_leg_option | Market and selection |
bet_leg_data | Extra bet related data (Aardvark internal) |
bet_leg_current_odds | Actual odds for this selection |
bet_leg_issued_odds | Original odds when bet was issued |
bet_leg_state | Selection state 1 - active 2 - won 3 - lost 4 - cancelled |
bet_leg_revoked | Set to true if leg was revoked due to early cash-out |
event_product_id | Product ID (Aardvark internal) |
event_uuid | Reference to event |
product table
Field | Description |
---|---|
product_id | Unique product identifier |
module | Module name for this product |