feat: 增强抽奖管理功能,支持手动创建、更新和删除期号
- 新增 API 路由和控制器,允许管理员手动创建、更新和删除抽奖期号。 - 更新抽奖调度逻辑,确保在抽奖时间和封盘时间的管理上更加灵活。 - 添加多语言支持的错误信息,提升用户体验。 - 更新测试用例,确保新功能的正确性和稳定性。
This commit is contained in:
25
app/Http/Requests/Admin/DrawStoreRequest.php
Normal file
25
app/Http/Requests/Admin/DrawStoreRequest.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
final class DrawStoreRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'draw_time' => ['required', 'string', 'max:32'],
|
||||
'start_time' => ['nullable', 'string', 'max:32'],
|
||||
'close_time' => ['nullable', 'string', 'max:32'],
|
||||
'draw_no' => ['nullable', 'string', 'max:32', 'regex:/^[0-9]{8}-[0-9]{3}$/'],
|
||||
'business_date' => ['nullable', 'date_format:Y-m-d'],
|
||||
'sequence_no' => ['nullable', 'integer', 'min:1', 'max:999'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user