feat(form-builder): form_field_configs relational table + non-validation key split + drop validation_rules JSON columns
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user