feat(form-builder): form_field_configs relational table + non-validation key split + drop validation_rules JSON columns
This commit is contained in:
@@ -51,7 +51,6 @@ final class FormField extends Model
|
||||
'help_text',
|
||||
'section',
|
||||
'options',
|
||||
'validation_rules',
|
||||
'is_required',
|
||||
'is_filterable',
|
||||
'is_portal_visible',
|
||||
@@ -70,7 +69,6 @@ final class FormField extends Model
|
||||
/** @var array<string, string> */
|
||||
protected $casts = [
|
||||
'options' => 'array',
|
||||
'validation_rules' => 'array',
|
||||
'conditional_logic' => 'array',
|
||||
'role_restrictions' => 'array',
|
||||
'translations' => 'array',
|
||||
@@ -116,6 +114,11 @@ final class FormField extends Model
|
||||
return $this->morphMany(FormFieldValidationRule::class, 'owner');
|
||||
}
|
||||
|
||||
public function configs(): MorphMany
|
||||
{
|
||||
return $this->morphMany(FormFieldConfig::class, 'owner');
|
||||
}
|
||||
|
||||
/**
|
||||
* Nuanced activity log (ARCH §17.1; S1 Phase 4b). Callers choose which
|
||||
* events are worth logging — e.g. created/deleted/restored, field_type
|
||||
|
||||
Reference in New Issue
Block a user