# DROP JACKPOTS GENERAL SETTINGS
1. Table "Jackpots_statuses"
- min_ggr
/* SELECT COALESCE(SUM(bets) - SUM(wins), 0) as ggr
FROM betwingames_log
WHERE
EXTRACT(EPOCH FROM NOW()) - EXTRACT(EPOCH FROM date) < EXTRACT(EPOCH FROM make_interval(days => 30))
AND
"account_id"=ACCOUNT_ID */
- must_drop - TRUE
- id, group_id, jackpot, min, max, ready, percent, winners_count, min_show as usual
2. Table JackpotGroups
- type "global_game_requested"
3. Table Jackpot_groups_global_games
- jackpot_group_id
- game_id
4. Table Users
- jackpot_status - enabled
5. Table Game
- internal_jackpot - yes
43827
11110
________________________________________________
GENERAL JP PARAMETERS, first part are using for DROP JP
________________________________________________
```
struct JackpotDesc
{
JackpotType jackpot_type{}; // jackpot type number
double min_ready_amount{}; // minimal "ready" jackpot amount
double max_ready_amount{}; // maximum "ready" jackpot amount
double base_amount{}; // base minimal amount that can be in jackpot bank after the play
double min_show_amount{}; // minimal visible amount for the jackpot
double bet_percent{}; // percent (0..1) for jackpot group amount accumulation (group_amount = bet_amount * bet_percent)
boost::optional<double> min_ggr; // minimal Gross Gaming Revenue for taking part in jackpot play if it was set
bool must_drop; // play is started when "ready" amount is reached to "max_ready_amount" or deadline time is reached
duration drop_duration{}; // duration for the drop jackpot - WE MUST INDICATE FOR JP DROPPED BY TIME
//////////////////////////////
double min_bet{}; // minimal bet for the jackpot
double denomination{}; // denomination factor for correct rounding of jackpot prize
int required_active_players_count{}; // required minimal active players count for playing jackpot
bool is_shared{}; // prize is divided for all winners or there is only one winner
duration activity_duration{}; // duration for the jackpot activity
}
```
HOURLY | DAILY JACKPOTS
-----------------------
2. Table "Special_sequencers":
- sequence_type_id = 6
- settings {0, 1, 2, 3, 4, 0, 20, 30, 50, 0}
/*
Example description:
0 40 50 65 95 100 duration parts fractions
|--------|--|---|------|-|
0% 20% 30% 50% 0% duration parts chances
duration parts chances:
0, 1, 2, 3, 4, -- data
0, 20, 30, 50, 0 -- weights
duration parts fractions
40, 50, 65, 95, 100 -- data
*/
Table "Jackpots_statuses"
- time_period - duration for the drop jackpot (in ms)
- time_drop - (planned) calculated while JP play, "ready" time for start of trying to play jp if somwone wothy
- max_time_drop - (deadline) calculated while JP play, time to play jp if worthy player was not found before
- "time_drop" AND "max_time_drop" set one time and then it will be calculated automaticly next time after JP play (? is it OK)
------------------------------------------------------------