feat(form-builder): form_field_configs relational table + non-validation key split + drop validation_rules JSON columns

This commit is contained in:
2026-04-24 22:42:35 +02:00
parent 9d2758a42c
commit d494478c08
31 changed files with 1233 additions and 60 deletions

View File

@@ -28,6 +28,7 @@ final class FormFieldService
private readonly FormSchemaService $schemaService,
private readonly FormFieldBindingService $bindingService,
private readonly FormFieldValidationRuleService $validationRuleService,
private readonly FormFieldConfigService $configService,
) {}
public function create(FormSchema $schema, array $data): FormField
@@ -242,7 +243,6 @@ final class FormFieldService
'label' => $library->label,
'help_text' => $library->help_text,
'options' => $library->options,
'validation_rules' => $library->validation_rules,
'is_required' => (bool) $library->default_is_required,
'is_filterable' => (bool) $library->default_is_filterable,
'translations' => $library->translations,
@@ -260,6 +260,7 @@ final class FormFieldService
$this->bindingService->copyBindings($library, $field);
$this->validationRuleService->copyRules($library, $field);
$this->configService->copyConfigs($library, $field);
FormFieldLibrary::query()->whereKey($library->id)->increment('usage_count');