feat: 添加 Laravel Reverb 支持,更新 .env.example 文件以配置 WebSocket,增强彩票调度功能,更新 API 路由以支持期号管理与结果发布
This commit is contained in:
27
app/Services/Draw/DrawPrizeLayout.php
Normal file
27
app/Services/Draw/DrawPrizeLayout.php
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user