|
@@ -11,13 +11,13 @@ public function rules(): array
|
|
|
$isUpdate = $this->isMethod('PUT') || $this->isMethod('PATCH');
|
|
$isUpdate = $this->isMethod('PUT') || $this->isMethod('PATCH');
|
|
|
|
|
|
|
|
return [
|
|
return [
|
|
|
- 'title' => ($isUpdate ? 'sometimes' : 'required') . '|string|max:255',
|
|
|
|
|
- 'severity' => ($isUpdate ? 'sometimes' : 'required') . '|string|in:alta,normal,baixa',
|
|
|
|
|
- 'scope' => ($isUpdate ? 'sometimes' : 'required') . '|string|in:all,internal,specific',
|
|
|
|
|
|
|
+ 'title' => ($isUpdate ? 'sometimes' : 'required') . '|string|max:255',
|
|
|
|
|
+ 'severity' => ($isUpdate ? 'sometimes' : 'required') . '|string|in:alta,normal,baixa',
|
|
|
|
|
+ 'scope' => ($isUpdate ? 'sometimes' : 'required') . '|string|in:all,internal,specific',
|
|
|
'target_unit_id' => 'nullable|integer|exists:units,id',
|
|
'target_unit_id' => 'nullable|integer|exists:units,id',
|
|
|
- 'sector' => 'nullable|string|max:255',
|
|
|
|
|
- 'description' => 'nullable|string',
|
|
|
|
|
- 'status' => 'sometimes|string|in:in_progress,resolved,unresolved',
|
|
|
|
|
|
|
+ 'sector' => 'nullable|string|max:255',
|
|
|
|
|
+ 'description' => 'nullable|string',
|
|
|
|
|
+ 'status' => 'sometimes|string|in:in_progress,resolved,unresolved',
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|