Files
lotteryLaravel/app/Services/Draw/DrawPrizeLayout.php

28 lines
700 B
PHP

<?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;
}
}