Update migrations for backoffice configuration
This commit is contained in:
parent
77dfcaf5bf
commit
c5a2501865
|
@ -0,0 +1,39 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class NhAct
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $nh_network_config_id
|
||||||
|
* @property string $name
|
||||||
|
* @property string $billing_type
|
||||||
|
* @property string $authorization_type
|
||||||
|
* @property Carbon|null $created_at
|
||||||
|
* @property Carbon|null $updated_at
|
||||||
|
*
|
||||||
|
* @package App\Models
|
||||||
|
*/
|
||||||
|
class NhAct extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'nh_acts';
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'nh_network_config_id' => 'int'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'nh_network_config_id',
|
||||||
|
'name',
|
||||||
|
'billing_type',
|
||||||
|
'authorization_type'
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class NhMonthsPricesGrid
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $nh_network_config_id
|
||||||
|
* @property float $number_of_months
|
||||||
|
* @property float $min_amount
|
||||||
|
* @property Carbon|null $created_at
|
||||||
|
* @property Carbon|null $updated_at
|
||||||
|
*
|
||||||
|
* @package App\Models
|
||||||
|
*/
|
||||||
|
class NhMonthsPricesGrid extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'nh_months_prices_grid';
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'nh_network_config_id' => 'int',
|
||||||
|
'number_of_months' => 'float',
|
||||||
|
'min_amount' => 'float'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'nh_network_config_id',
|
||||||
|
'number_of_months',
|
||||||
|
'min_amount'
|
||||||
|
];
|
||||||
|
}
|
|
@ -17,11 +17,15 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
* @property string $provider_billing_period
|
* @property string $provider_billing_period
|
||||||
* @property float $max_number_of_beneficiaries
|
* @property float $max_number_of_beneficiaries
|
||||||
* @property float $age_limit_of_child_beneficiary
|
* @property float $age_limit_of_child_beneficiary
|
||||||
* @property string $support_type
|
* @property float $coverage_limit_per_insured_per_year
|
||||||
* @property float $percentage_insurer
|
* @property float $current_affection_percentage_insurer
|
||||||
* @property float $percentage_insured
|
* @property float $current_affection_percentage_insured
|
||||||
* @property Carbon $updated_at
|
* @property float $long_term_affection_percentage_insurer
|
||||||
* @property Carbon $created_at
|
* @property float $long_term_affection_percentage_insured
|
||||||
|
* @property float $exoneration_percentage_insurer
|
||||||
|
* @property float $exoneration_percentage_insured
|
||||||
|
* @property Carbon|null $created_at
|
||||||
|
* @property Carbon|null $updated_at
|
||||||
*
|
*
|
||||||
* @package App\Models
|
* @package App\Models
|
||||||
*/
|
*/
|
||||||
|
@ -33,8 +37,13 @@ class NhNetworksConfig extends Model
|
||||||
'network_id' => 'int',
|
'network_id' => 'int',
|
||||||
'max_number_of_beneficiaries' => 'float',
|
'max_number_of_beneficiaries' => 'float',
|
||||||
'age_limit_of_child_beneficiary' => 'float',
|
'age_limit_of_child_beneficiary' => 'float',
|
||||||
'percentage_insurer' => 'float',
|
'coverage_limit_per_insured_per_year' => 'float',
|
||||||
'percentage_insured' => 'float'
|
'current_affection_percentage_insurer' => 'float',
|
||||||
|
'current_affection_percentage_insured' => 'float',
|
||||||
|
'long_term_affection_percentage_insurer' => 'float',
|
||||||
|
'long_term_affection_percentage_insured' => 'float',
|
||||||
|
'exoneration_percentage_insurer' => 'float',
|
||||||
|
'exoneration_percentage_insured' => 'float'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
|
@ -42,8 +51,12 @@ class NhNetworksConfig extends Model
|
||||||
'provider_billing_period',
|
'provider_billing_period',
|
||||||
'max_number_of_beneficiaries',
|
'max_number_of_beneficiaries',
|
||||||
'age_limit_of_child_beneficiary',
|
'age_limit_of_child_beneficiary',
|
||||||
'support_type',
|
'coverage_limit_per_insured_per_year',
|
||||||
'percentage_insurer',
|
'current_affection_percentage_insurer',
|
||||||
'percentage_insured'
|
'current_affection_percentage_insured',
|
||||||
|
'long_term_affection_percentage_insurer',
|
||||||
|
'long_term_affection_percentage_insured',
|
||||||
|
'exoneration_percentage_insurer',
|
||||||
|
'exoneration_percentage_insured'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class NhYearsPricesGrid
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $nh_network_config_id
|
||||||
|
* @property float $min_age
|
||||||
|
* @property float $max_age
|
||||||
|
* @property float $markup_percentage
|
||||||
|
* @property Carbon|null $created_at
|
||||||
|
* @property Carbon|null $updated_at
|
||||||
|
*
|
||||||
|
* @package App\Models
|
||||||
|
*/
|
||||||
|
class NhYearsPricesGrid extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'nh_years_prices_grid';
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'nh_network_config_id' => 'int',
|
||||||
|
'min_age' => 'float',
|
||||||
|
'max_age' => 'float',
|
||||||
|
'markup_percentage' => 'float'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'nh_network_config_id',
|
||||||
|
'min_age',
|
||||||
|
'max_age',
|
||||||
|
'markup_percentage'
|
||||||
|
];
|
||||||
|
}
|
|
@ -14,8 +14,12 @@ class AddNanoHealthColumnsInConfigWalletTable extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('configWallet', function (Blueprint $table) {
|
Schema::table('configWallet', function (Blueprint $table) {
|
||||||
|
if (!Schema::hasColumn('configWallet', 'nh_network_config_id')) {
|
||||||
$table->integer('nh_network_config_id')->nullable();
|
$table->integer('nh_network_config_id')->nullable();
|
||||||
$table->boolean('enabled')->default(0);
|
}
|
||||||
|
if (!Schema::hasColumn('configWallet', 'enabled')) {
|
||||||
|
$table->boolean('enabled')->default(1);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +32,7 @@ class AddNanoHealthColumnsInConfigWalletTable extends Migration
|
||||||
{
|
{
|
||||||
Schema::table('configWallet', function (Blueprint $table) {
|
Schema::table('configWallet', function (Blueprint $table) {
|
||||||
//
|
//
|
||||||
$table->dropColumn(['nh_network_config_id', ]);
|
$table->dropColumn(['nh_network_config_id', 'enabled']);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,16 +14,20 @@ class CreateNhNetworksConfigsTable extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('nh_networks_configs', function (Blueprint $table) {
|
Schema::create('nh_networks_configs', function (Blueprint $table) {
|
||||||
$table->integer('id', true);
|
$table->id();
|
||||||
$table->integer('network_id');
|
$table->integer('network_id');
|
||||||
$table->enum('provider_billing_period', ['WEEKLY', 'BIMONTHLY', 'MONTHLY'])->default('WEEKLY')->comment('Période de facturatio des prestataires : hebdomadaire ou bimensuel ,mensuel ');
|
$table->enum('provider_billing_period', ['WEEKLY', 'BIMONTHLY', 'MONTHLY'])->default('WEEKLY')->comment('Période de facturation des prestataires : hebdomadaire ou bimensuel ,mensuel ');
|
||||||
$table->decimal('max_number_of_beneficiaries', 1, 0)->default(0)->comment('Nombre d’ayant droit maximum : un nombre à un chiffre');
|
$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('age_limit_of_child_beneficiary', 2, 0)->default(0)->comment('Age limite de l’ayant droit enfant : un nombre à 2 chiffres');
|
||||||
$table->enum('support_type', ['CURRENT_AFFECTATION', 'LONG_TERM_AFFECTATION', 'EXONERATION'])->default('CURRENT_AFFECTATION')->comment('type de prises en charge');
|
$table->decimal('coverage_limit_per_insured_per_year', 10, 2)->default(0)->comment("Limite de la couverture par assuré par an");
|
||||||
$table->decimal('percentage_insurer', 2, 0)->default(0);
|
$table->decimal('current_affection_percentage_insurer', 2, 0)->default(0)->comment("Affection courante: % part assureur");
|
||||||
$table->decimal('percentage_insured', 2, 0)->default(0);
|
$table->decimal('current_affection_percentage_insured', 2, 0)->default(0)->comment("Affection courante: % part assuré");
|
||||||
$table->timestamp('updated_at')->useCurrent();
|
$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->timestamp('created_at')->useCurrent();
|
$table->timestamp('created_at')->useCurrent();
|
||||||
|
$table->timestamp('updated_at')->useCurrent();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class CreateNhPricesGridTable extends Migration
|
class CreateNhYearsPricesGridTable extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
|
@ -13,16 +13,14 @@ class CreateNhPricesGridTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('nh_prices_grid', function (Blueprint $table) {
|
Schema::create('nh_years_prices_grid', function (Blueprint $table) {
|
||||||
$table->integer('id')->primary();
|
$table->id();
|
||||||
$table->integer('nh_network_config_id');
|
$table->integer('nh_network_config_id');
|
||||||
$table->decimal('min_age', 2, 0)->default(0);
|
$table->decimal('min_age', 2, 0)->default(0);
|
||||||
$table->decimal('max_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', 2, 0)->default(0)->comment('Pourcentage de majoration');
|
||||||
$table->decimal('min_amount', 10)->default(0);
|
|
||||||
$table->decimal('number_of_months', 2, 0)->default(0);
|
|
||||||
$table->timestamp('updated_at')->useCurrent();
|
|
||||||
$table->timestamp('created_at')->useCurrent();
|
$table->timestamp('created_at')->useCurrent();
|
||||||
|
$table->timestamp('updated_at')->useCurrent();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +31,6 @@ class CreateNhPricesGridTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('nh_prices_grid');
|
Schema::dropIfExists('nh_years_prices_grid');
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateNhMonthsPricesGridTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('nh_months_prices_grid', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->integer('nh_network_config_id');
|
||||||
|
$table->decimal('number_of_months', 2, 0)->default(0);
|
||||||
|
$table->decimal('min_amount', 10)->default(0);
|
||||||
|
$table->timestamp('created_at')->useCurrent();
|
||||||
|
$table->timestamp('updated_at')->useCurrent();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('nh_months_prices_grid');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateNhActsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('nh_acts', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->integer('nh_network_config_id');
|
||||||
|
$table->string('name');
|
||||||
|
$table->enum('billing_type', ['PACKAGE', 'UNIT_PRICE'])->default('UNIT_PRICE')->comment('Type de facturation : forfait ou prix unitaire');
|
||||||
|
$table->enum('authorization_type', ['FREE', 'PRIOR'])->default('FREE')->comment("Type d'autorisation : préalable ou libre");
|
||||||
|
$table->timestamp('created_at')->useCurrent();
|
||||||
|
$table->timestamp('updated_at')->useCurrent();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('nh_acts');
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue