refactor(integration): generalizar el requisito de configuracion
Renombra requires_client_configuration a requires_configuration conservando los valores existentes y su rollback. Actualiza el modelo, la validacion, los seeders y los consumidores del campo para permitir configuraciones de cliente o tipo de sitio.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('integrations', function (Blueprint $table): void {
|
||||
$table->renameColumn('requires_client_configuration', 'requires_configuration');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('integrations', function (Blueprint $table): void {
|
||||
$table->renameColumn('requires_configuration', 'requires_client_configuration');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -17,7 +17,7 @@ class EmailIntegrationSeeder extends Seeder
|
||||
[
|
||||
'name' => 'Email',
|
||||
'url' => null,
|
||||
'requires_client_configuration' => false,
|
||||
'requires_configuration' => false,
|
||||
'integration_data_schema' => [
|
||||
'MAIL_MAILER' => 'required|string|in:smtp',
|
||||
'MAIL_SCHEME' => 'required|string|in:smtp',
|
||||
|
||||
@@ -17,7 +17,7 @@ class TelepagosIntegrationSeeder extends Seeder
|
||||
[
|
||||
'name' => 'Telepagos',
|
||||
'url' => 'https://api.telepagos.com.ar',
|
||||
'requires_client_configuration' => true,
|
||||
'requires_configuration' => true,
|
||||
'integration_data_schema' => [
|
||||
'username' => 'required|string',
|
||||
'password' => 'required|string',
|
||||
@@ -30,7 +30,7 @@ class TelepagosIntegrationSeeder extends Seeder
|
||||
[
|
||||
'name' => 'Telepagos Homologación',
|
||||
'url' => 'https://api.homo.telepagos.com.ar',
|
||||
'requires_client_configuration' => true,
|
||||
'requires_configuration' => true,
|
||||
'integration_data_schema' => [
|
||||
'username' => 'required|string',
|
||||
'password' => 'required|string',
|
||||
|
||||
Reference in New Issue
Block a user