addSeconds(30); } public function __construct( public readonly int $drawId, public readonly string $drawNo, public readonly string $firstPrizeNumber, public readonly string $currencyCode, public readonly int $totalPayoutAmount, public readonly int $winnerCount, public readonly string $triggerType, public readonly int $poolAmountAfter, public readonly int $emittedAtMs, ) {} /** @return array */ public function broadcastOn(): array { return [new Channel('lottery-hall')]; } public function broadcastAs(): string { return 'jackpot.burst'; } /** @return array{draw_id: int, draw_no: string, first_prize_number: string, currency_code: string, total_payout_amount: int, winner_count: int, trigger_type: string, pool_amount_after: int, emitted_at_ms: int} */ public function broadcastWith(): array { return [ 'draw_id' => $this->drawId, 'draw_no' => $this->drawNo, 'first_prize_number' => $this->firstPrizeNumber, 'currency_code' => $this->currencyCode, 'total_payout_amount' => $this->totalPayoutAmount, 'winner_count' => $this->winnerCount, 'trigger_type' => $this->triggerType, 'pool_amount_after' => $this->poolAmountAfter, 'emitted_at_ms' => $this->emittedAtMs, ]; } }