Перевод на DDD

This commit is contained in:
brusnitsyn
2026-07-31 17:19:03 +09:00
parent 2dd55b9d11
commit 2c6d4a04cc
48 changed files with 1796 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Infrastructure\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CreateDutyReportRequest extends FormRequest
{
public function authorize(): bool
{
return auth()->check();
}
public function rules(): array
{
return [
'period_start' => ['required', 'date'],
'period_end' => ['required', 'date', 'after_or_equal:period_start'],
'period_type' => ['nullable', 'string', 'in:day,week,month'],
'status_id' => ['nullable', 'integer', 'in:1,2,3'],
'observables' => ['nullable', 'array'],
'observables.*.id' => ['required', 'integer'],
'unwanted_events' => ['nullable', 'array'],
'unwanted_events.*.title' => ['required', 'string'],
];
}
}