first&last

This commit is contained in:
sbb45
2026-03-20 15:47:17 +05:00
commit d6441abdd2
230 changed files with 20367 additions and 0 deletions
@@ -0,0 +1,21 @@
<?php
namespace App\Http\Requests\Request;
use Illuminate\Foundation\Http\FormRequest;
class RateServiceRequestRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'client_rating' => ['required', 'integer', 'between:1,5'],
'client_comment' => ['nullable', 'string', 'max:2000'],
];
}
}
@@ -0,0 +1,21 @@
<?php
namespace App\Http\Requests\Request;
use Illuminate\Foundation\Http\FormRequest;
class StoreCommentRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'body' => ['required', 'string', 'max:5000'],
'is_internal' => ['nullable', 'boolean'],
];
}
}
@@ -0,0 +1,33 @@
<?php
namespace App\Http\Requests\Request;
use Illuminate\Foundation\Http\FormRequest;
class StoreServiceRequestRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'title' => ['required', 'string', 'max:255'],
'description' => ['required', 'string'],
'type_id' => ['required', 'exists:request_types,id'],
'priority_id' => ['required', 'exists:priorities,id'],
'status_id' => ['nullable', 'exists:statuses,id'],
'client_id' => ['required', 'exists:users,id'],
'assigned_to' => ['nullable', 'exists:users,id'],
'equipment_id' => ['nullable', 'exists:equipment,id'],
'location' => ['nullable', 'string', 'max:255'],
'planned_at' => ['nullable', 'date'],
'deadline_at' => ['nullable', 'date'],
'resolution_notes' => ['nullable', 'string'],
'attachments' => ['nullable', 'array', 'max:5'],
'attachments.*' => ['file', 'max:10240'],
];
}
}
@@ -0,0 +1,14 @@
<?php
namespace App\Http\Requests\Request;
class UpdateServiceRequestRequest extends StoreServiceRequestRequest
{
public function rules(): array
{
$rules = parent::rules();
$rules['title'][0] = 'sometimes';
return $rules;
}
}