Update Member Import
This commit is contained in:
@@ -16,6 +16,8 @@ return new class extends Migration
|
||||
Schema::create('members', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('member_id')->nullable()->unique();
|
||||
$table->string('payor_id')->nullable();
|
||||
$table->string('name_prefix')->nullable();
|
||||
$table->string('name');
|
||||
$table->string('name_suffix')->nullable();
|
||||
@@ -25,9 +27,10 @@ return new class extends Migration
|
||||
$table->string('language')->nullable();
|
||||
$table->string('race')->nullable();
|
||||
$table->string('marital_status')->nullable();
|
||||
$table->foreignId('principle_id')->nullable()->index();
|
||||
$table->string('relation_with_principle')->nullable();
|
||||
$table->date('bpjs_class')->nullable();
|
||||
$table->string('record_type', 1)->nullable();
|
||||
$table->string('principal_id')->nullable()->index();
|
||||
$table->string('relation_with_principal')->nullable();
|
||||
$table->string('bpjs_class')->nullable();
|
||||
$table->boolean('active')->default(true);
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
@@ -15,7 +15,19 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('corporate_employees', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('corporate_id')->index();
|
||||
$table->foreignId('member_id')->index();
|
||||
$table->string('branch_code')->nullable()->index();
|
||||
$table->foreignId('division_id')->nullable()->index();
|
||||
$table->string('nik')->nullable()->index();
|
||||
$table->string('status')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->unsignedBigInteger('created_by')->nullable();
|
||||
$table->unsignedBigInteger('updated_by')->nullable();
|
||||
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ return new class extends Migration
|
||||
Schema::create('corporate_policies', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('corporate_id');
|
||||
$table->string('code')->unique();
|
||||
$table->string('policy_id')->unique();
|
||||
$table->decimal('total_premi', 15, 2)->nullable();
|
||||
$table->decimal('minimal_deposit_percentage', 15, 2)->nullable();
|
||||
$table->decimal('minimal_deposit_net', 15, 2)->nullable();
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('member_policies', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('policy_id');
|
||||
$table->string('member_id');
|
||||
$table->string('status')->default('active');
|
||||
$table->dateTime('start')->nullable();
|
||||
$table->dateTime('end')->nullalbe();
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->unsignedBigInteger('created_by')->nullable();
|
||||
$table->unsignedBigInteger('updated_by')->nullable();
|
||||
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||
|
||||
$table->index(['policy_id', 'member_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('member_policies');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user