c-o-l-i-n / joshies

🚀 (Work in Progress) Supercharge dynamic, multi-day competitions with realtime brackets, betting, analytics, and more
1 stars 0 forks source link

Core Betting Flow #7

Closed c-o-l-i-n closed 1 week ago

c-o-l-i-n commented 4 weeks ago

We'll start with the core flow of creating, accepting, and manually resolving bets. Later on, we will add automatic bet resolution based on event results.

Core Flow

Notes:

Implementation Notes:

We will probably need pages for the following:

bet table structure:

Column Data Type Key
id int8 PK
session_id int8 FK session.id
requester_player_id int8 FK player.id
opponent_player_id int8 FK player.id
reguester_wager int8
opponent_wager int8
description text
status bet_status
created_at timestampz
updated_at timestampz

bet_status database enum: