From e68991d0ff5fd7804a0af523aee60bf73173a5d7 Mon Sep 17 00:00:00 2001 From: sayliraut Date: Wed, 9 Apr 2025 17:59:56 +0530 Subject: [PATCH 1/2] changes in table --- app/Http/Controllers/APIS/AdminApi/CustomerController.php | 6 +++--- .../migrations/2025_03_11_070823_create_customers_table.php | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/APIS/AdminApi/CustomerController.php b/app/Http/Controllers/APIS/AdminApi/CustomerController.php index 54a99a2..0f7b0db 100644 --- a/app/Http/Controllers/APIS/AdminApi/CustomerController.php +++ b/app/Http/Controllers/APIS/AdminApi/CustomerController.php @@ -86,9 +86,9 @@ class CustomerController extends Controller [ 'entity_type' => $apiData['id']['entityType'] ?? 'CUSTOMER', 'created_time' => $apiData['createdTime'] ?? now()->timestamp, - 'country' => $apiData['country'] ?? null, - 'state' => $apiData['state'] ?? null, - 'city' => $apiData['city'] ?? null, + 'country_xid' => $apiData['country'] ?? null, + 'state_xid' => $apiData['state'] ?? null, + 'city_xid' => $apiData['city'] ?? null, 'address' => $apiData['address'] ?? null, 'address2' => $apiData['address2'] ?? null, 'zip' => $apiData['zip'] ?? null, diff --git a/database/migrations/2025_03_11_070823_create_customers_table.php b/database/migrations/2025_03_11_070823_create_customers_table.php index 302fabb..5497910 100644 --- a/database/migrations/2025_03_11_070823_create_customers_table.php +++ b/database/migrations/2025_03_11_070823_create_customers_table.php @@ -29,6 +29,10 @@ return new class extends Migration $table->uuid('external_id')->nullable(); $table->integer('version')->default(1); $table->json('additional_info')->nullable(); + $table->bigInteger('country_xid')->nullable(); + $table->longText('state_xid')->nullable(); + $table->longText('city_xid')->nullable(); + $table->timestamps(); // $table->foreign('tenant_id')->references('id')->on('tenants'); -- 2.34.1