Implement EAV system for dynamic event-specific registration fields with organisation-level templates, person section preferences with priority ranking, and TagSyncService for deferred tag_picker sync. New tables: registration_field_templates, registration_form_fields, person_field_values, person_section_preferences. New columns: persons.remarks, events.registration_show_section_preferences, events.registration_show_availability. 58 tests, 126 assertions — all 432 tests pass (zero regressions). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
35 lines
1.2 KiB
PHP
35 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Api\V1;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
final class StoreEventRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/** @return array<string, mixed> */
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => ['required', 'string', 'max:255'],
|
|
'slug' => ['required', 'string', 'max:255', 'regex:/^[a-z0-9-]+$/'],
|
|
'start_date' => ['required', 'date'],
|
|
'end_date' => ['required', 'date', 'after_or_equal:start_date'],
|
|
'timezone' => ['sometimes', 'string', 'max:50'],
|
|
'status' => ['sometimes', 'string', 'in:draft,published,registration_open,buildup,showday,teardown,closed'],
|
|
'parent_event_id' => ['nullable', 'ulid', 'exists:events,id'],
|
|
'event_type' => ['nullable', 'in:event,festival,series'],
|
|
'event_type_label' => ['nullable', 'string', 'max:50'],
|
|
'sub_event_label' => ['nullable', 'string', 'max:50'],
|
|
'registration_show_section_preferences' => ['nullable', 'boolean'],
|
|
'registration_show_availability' => ['nullable', 'boolean'],
|
|
];
|
|
}
|
|
}
|