<?php
declare(strict_types=1);
namespace App\Domain\Project\Requests;
use App\BaseClasses\BaseApiRequest;
class CreateProjectGroupRequest extends BaseApiRequest
{
public static function bodyParameters(): array
{
return [
'name' => ['description' => 'name'],
'description' => ['description' => 'description'],
'projects' => ['description' => 'projects ids'],
];
}
public static function example(): array
{
return [
'name' => 'Тестовая группа проектов',
'description' => 'Описание',
'projects' => 'ID проектов',
];
}
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'projects' => ['nullable', 'array'],
];
}
}