- Added client_id field to StoreTenantRequest and UpdateTenantRequest for tenant management. - Updated TenantResource to include client_id in the response. - Created migration to establish clients table and link tenants to clients. - Migrated existing tenant integrations to client_integrations table. - Grouped specific tenants under a shared client (OnTicket) in a new migration. - Updated seeders to reflect new client structure and relationships. - Adjusted integration configurations to require client instead of tenant. - Added tests for client integration functionality and ensured existing tests reflect the new client structure.
42 lines
1.2 KiB
PHP
42 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Domains\Integration\Models\Integration;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class TelepagosIntegrationSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
Integration::updateOrCreate(
|
|
['integration_code' => 'telepagos'],
|
|
[
|
|
'name' => 'Telepagos',
|
|
'url' => 'https://api.telepagos.com.ar',
|
|
'requires_client_configuration' => true,
|
|
'integration_data_schema' => [
|
|
'username' => 'required|string',
|
|
'password' => 'required|string',
|
|
],
|
|
]
|
|
);
|
|
|
|
Integration::updateOrCreate(
|
|
['integration_code' => 'telepagos_homo'],
|
|
[
|
|
'name' => 'Telepagos Homologación',
|
|
'url' => 'https://api.homo.telepagos.com.ar',
|
|
'requires_client_configuration' => true,
|
|
'integration_data_schema' => [
|
|
'username' => 'required|string',
|
|
'password' => 'required|string',
|
|
],
|
|
]
|
|
);
|
|
}
|
|
}
|