From 76647c7c4fe7b62cca1906dc7376c1ac675a393f Mon Sep 17 00:00:00 2001 From: root Date: Thu, 11 Dec 2025 15:48:59 +0100 Subject: [PATCH] add aditional fields in nh_networks_configs table --- app/Http/Controllers/WalletController.php | 4 +- ...on_fields_to_nh_networks_configs_table.php | 46 +++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100755 database/migrations/2025_12_11_144147_add_affection_fields_to_nh_networks_configs_table.php diff --git a/app/Http/Controllers/WalletController.php b/app/Http/Controllers/WalletController.php index eadffd5..5a4ca7d 100755 --- a/app/Http/Controllers/WalletController.php +++ b/app/Http/Controllers/WalletController.php @@ -573,7 +573,7 @@ INNER JOIN countries c ON oc.id_country = c.id INNER JOIN type_operators top ON $user_banking_account_verif->save(); // Envoyer une requete vers la banque contant ses informations personnelles pour verfication du code iban - Log::info('-------------------------- User - Rattacher le compte bancaire au wallet ------------------------------------'); + Log::info('-------------------------- User - Rattacher le compte bancaire au wallet --------------------------'); Log::info(json_encode( array_merge($request->toArray(), $identification->toArray(), ['id_transaction' => $user_banking_account_verif->id_transaction]) )); @@ -709,7 +709,7 @@ INNER JOIN countries c ON oc.id_country = c.id INNER JOIN type_operators top ON } } $bank_name = $network_bank->operators_country->operator->nom; - + $bankAccount = new UserBankAccount(); $bankAccount->id_user = $user->id; $bankAccount->id_operator_country = $request->id_operator; diff --git a/database/migrations/2025_12_11_144147_add_affection_fields_to_nh_networks_configs_table.php b/database/migrations/2025_12_11_144147_add_affection_fields_to_nh_networks_configs_table.php new file mode 100755 index 0000000..a2516f1 --- /dev/null +++ b/database/migrations/2025_12_11_144147_add_affection_fields_to_nh_networks_configs_table.php @@ -0,0 +1,46 @@ +decimal('long_term_affection_percentage_insurer', 5, 2)->default(0)->after('percentage_insured'); + $table->decimal('long_term_affection_percentage_insured', 5, 2)->default(0)->after('long_term_affection_percentage_insurer'); + + $table->decimal('current_affection_percentage_insurer', 5, 2)->default(0)->after('long_term_affection_percentage_insured'); + $table->decimal('current_affection_percentage_insured', 5, 2)->default(0)->after('current_affection_percentage_insurer'); + + $table->decimal('exoneration_percentage_insurer', 5, 2)->default(0)->after('current_affection_percentage_insured'); + $table->decimal('exoneration_percentage_insured', 5, 2)->default(0)->after('exoneration_percentage_insurer'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('nh_networks_configs', function (Blueprint $table) { + $table->dropColumn([ + 'long_term_affection_percentage_insurer', + 'long_term_affection_percentage_insured', + 'current_affection_percentage_insurer', + 'current_affection_percentage_insured', + 'exoneration_percentage_insurer', + 'exoneration_percentage_insured' + ]); + }); + } +}