30 lines
838 B
PHP
30 lines
838 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Requests\V1\Equipment;
|
||
|
|
|
||
|
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
|
||
|
|
class StoreEquipmentRepairRequest extends FormRequest
|
||
|
|
{
|
||
|
|
public function authorize(): bool
|
||
|
|
{
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function rules(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'equipment_id' => 'required|integer|exists:equipments,id',
|
||
|
|
'repair_date' => 'required|date',
|
||
|
|
'repair_type' => 'nullable|string|in:internal,external',
|
||
|
|
'repair_hours' => 'nullable|numeric|min:0',
|
||
|
|
'description' => 'nullable|string',
|
||
|
|
'cost' => 'nullable|numeric|min:0',
|
||
|
|
'vendor' => 'nullable|string|max:100',
|
||
|
|
'repaired_by' => 'nullable|integer|exists:users,id',
|
||
|
|
'memo' => 'nullable|string',
|
||
|
|
'options' => 'nullable|array',
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|