From 6429b36f0b27d7db1e673ac1d304684ecf0a996c Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Thu, 14 Oct 2021 17:12:01 +0100 Subject: [PATCH] Update migrations for backoffice configuration --- ...61135_create_nh_networks_configs_table.php | 12 +++--- ...1135_create_nh_years_prices_grid_table.php | 2 +- ...020_create_nh_validating_doctors_table.php | 40 +++++++++++++++++++ ...22249_create_nh_provider_classes_table.php | 34 ++++++++++++++++ ...d_nh_provider_class_id_in_agents_table.php | 34 ++++++++++++++++ 5 files changed, 115 insertions(+), 7 deletions(-) create mode 100644 database/migrations/2021_10_11_163020_create_nh_validating_doctors_table.php create mode 100644 database/migrations/2021_10_14_122249_create_nh_provider_classes_table.php create mode 100644 database/migrations/2021_10_14_151601_add_nh_provider_class_id_in_agents_table.php diff --git a/database/migrations/2021_10_04_161135_create_nh_networks_configs_table.php b/database/migrations/2021_10_04_161135_create_nh_networks_configs_table.php index 30967f6..a76db4b 100644 --- a/database/migrations/2021_10_04_161135_create_nh_networks_configs_table.php +++ b/database/migrations/2021_10_04_161135_create_nh_networks_configs_table.php @@ -20,12 +20,12 @@ class CreateNhNetworksConfigsTable extends Migration $table->decimal('max_number_of_beneficiaries', 1, 0)->default(0)->comment('Nombre d’ayant droit maximum : un nombre à un chiffre'); $table->decimal('age_limit_of_child_beneficiary', 2, 0)->default(0)->comment('Age limite de l’ayant droit enfant : un nombre à 2 chiffres'); $table->decimal('coverage_limit_per_insured_per_year', 10, 2)->default(0)->comment("Limite de la couverture par assuré par an"); - $table->decimal('current_affection_percentage_insurer', 2, 0)->default(0)->comment("Affection courante: % part assureur"); - $table->decimal('current_affection_percentage_insured', 2, 0)->default(0)->comment("Affection courante: % part assuré"); - $table->decimal('long_term_affection_percentage_insurer', 2, 0)->default(0)->comment("Affection longue durée: % part assureur"); - $table->decimal('long_term_affection_percentage_insured', 2, 0)->default(0)->comment("Affection longue durée: % part assuré"); - $table->decimal('exoneration_percentage_insurer', 2, 0)->default(0)->comment("Exoneration: % part assureur"); - $table->decimal('exoneration_percentage_insured', 2, 0)->default(0)->comment("Exoneration: % part assuré"); + $table->decimal('current_affection_percentage_insurer', 3, 0)->default(0)->comment("Affection courante: % part assureur"); + $table->decimal('current_affection_percentage_insured', 3, 0)->default(0)->comment("Affection courante: % part assuré"); + $table->decimal('long_term_affection_percentage_insurer', 3, 0)->default(0)->comment("Affection longue durée: % part assureur"); + $table->decimal('long_term_affection_percentage_insured', 3, 0)->default(0)->comment("Affection longue durée: % part assuré"); + $table->decimal('exoneration_percentage_insurer', 3, 0)->default(0)->comment("Exoneration: % part assureur"); + $table->decimal('exoneration_percentage_insured', 3, 0)->default(0)->comment("Exoneration: % part assuré"); $table->timestamp('created_at')->useCurrent(); $table->timestamp('updated_at')->useCurrent(); }); diff --git a/database/migrations/2021_10_04_161135_create_nh_years_prices_grid_table.php b/database/migrations/2021_10_04_161135_create_nh_years_prices_grid_table.php index ec5980e..204f3f7 100644 --- a/database/migrations/2021_10_04_161135_create_nh_years_prices_grid_table.php +++ b/database/migrations/2021_10_04_161135_create_nh_years_prices_grid_table.php @@ -18,7 +18,7 @@ class CreateNhYearsPricesGridTable extends Migration $table->integer('nh_network_config_id'); $table->decimal('min_age', 2, 0)->default(0); $table->decimal('max_age', 2, 0)->default(0); - $table->decimal('markup_percentage', 2, 0)->default(0)->comment('Pourcentage de majoration'); + $table->decimal('markup_percentage', 3, 0)->default(0)->comment('Pourcentage de majoration'); $table->timestamp('created_at')->useCurrent(); $table->timestamp('updated_at')->useCurrent(); }); diff --git a/database/migrations/2021_10_11_163020_create_nh_validating_doctors_table.php b/database/migrations/2021_10_11_163020_create_nh_validating_doctors_table.php new file mode 100644 index 0000000..becd41f --- /dev/null +++ b/database/migrations/2021_10_11_163020_create_nh_validating_doctors_table.php @@ -0,0 +1,40 @@ +id(); + $table->integer('nh_network_config_id'); + $table->string('firstname')->nullable(); + $table->string('lastname'); + $table->string('email')->unique(); + $table->string('phone')->nullable(); + $table->string('password')->nullable(); + $table->string('salt')->nullable(); + $table->string('token')->unique(); + $table->timestamp('created_at')->useCurrent(); + $table->timestamp('updated_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('nh_validating_doctors'); + } +} diff --git a/database/migrations/2021_10_14_122249_create_nh_provider_classes_table.php b/database/migrations/2021_10_14_122249_create_nh_provider_classes_table.php new file mode 100644 index 0000000..66222d8 --- /dev/null +++ b/database/migrations/2021_10_14_122249_create_nh_provider_classes_table.php @@ -0,0 +1,34 @@ +id(); + $table->integer('nh_network_config_id'); + $table->string('name')->comment("Nom de la classe de prestataire"); + $table->timestamp('created_at')->useCurrent(); + $table->timestamp('updated_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('nh_provider_classes'); + } +} diff --git a/database/migrations/2021_10_14_151601_add_nh_provider_class_id_in_agents_table.php b/database/migrations/2021_10_14_151601_add_nh_provider_class_id_in_agents_table.php new file mode 100644 index 0000000..35727cd --- /dev/null +++ b/database/migrations/2021_10_14_151601_add_nh_provider_class_id_in_agents_table.php @@ -0,0 +1,34 @@ +integer('nh_provider_class_id')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('agents', function (Blueprint $table) { + // + $table->dropColumn(['nh_provider_class_id']); + }); + } +}