user affiliation schema completed

This commit is contained in:
Giuseppe Naponiello
2026-06-24 16:30:21 +02:00
parent 032f6a08df
commit 6a07c3e922
13 changed files with 890 additions and 3 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Http\Requests;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class IndexUserAffiliationRequest extends FormRequest
{
/**
* L'autorizzazione è gestita dal middleware di rotta (tier.app).
*/
public function authorize(): bool
{
return true;
}
/**
* @return array<string, ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'institution_id' => ['nullable', 'integer', 'exists:institutions,id'],
'user_id' => ['nullable', 'integer', 'exists:users,id'],
'user_position_id' => ['nullable', 'integer', 'exists:user_positions,id'],
'open' => ['nullable', 'boolean'],
'trashed' => ['nullable', Rule::in(['with', 'only'])],
'per_page' => ['nullable', 'integer', 'min:1', 'max:100'],
];
}
}