25 lines
636 B
PHP
25 lines
636 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Api\V1\Wash;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class StartWashRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'machine_uuid' => ['required', 'uuid', 'exists:machines,uuid'],
|
|
'booking_uuid' => ['nullable', 'uuid', 'exists:bookings,uuid'],
|
|
'trigger_method' => ['required', Rule::in(['qr_code', 'booking', 'supervisor', 'system'])],
|
|
'program' => ['nullable', 'string', 'max:100'],
|
|
];
|
|
}
|
|
}
|