feat: registration form fields, section preferences, tag sync & schema updates
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>
This commit is contained in:
37
api/app/Models/PersonFieldValue.php
Normal file
37
api/app/Models/PersonFieldValue.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
final class PersonFieldValue extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'person_id',
|
||||
'registration_form_field_id',
|
||||
'value',
|
||||
'selected_options',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'selected_options' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
public function person(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Person::class);
|
||||
}
|
||||
|
||||
public function registrationFormField(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(RegistrationFormField::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user