feat: 添加 Laravel Reverb 支持,更新 .env.example 文件以配置 WebSocket,增强彩票调度功能,更新 API 路由以支持期号管理与结果发布

This commit is contained in:
2026-05-09 17:40:49 +08:00
parent 781cf10928
commit aeaf124096
42 changed files with 3886 additions and 5 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Services\Draw;
/**
* 开奖号码行布局(与界面文档 4.6 奖项分区一致)。
*
* @return array<int, array{prize_type: string, prize_index: int}>
*/
final class DrawPrizeLayout
{
public static function slots(): array
{
$slots = [];
foreach (['first', 'second', 'third'] as $tier) {
$slots[] = ['prize_type' => $tier, 'prize_index' => 0];
}
for ($i = 0; $i < 10; $i++) {
$slots[] = ['prize_type' => 'starter', 'prize_index' => $i];
}
for ($i = 0; $i < 10; $i++) {
$slots[] = ['prize_type' => 'consolation', 'prize_index' => $i];
}
return $slots;
}
}