feature/shoraka-integration

This commit is contained in:
nurafrinaalimi16
2026-09-17 15:08:43 +08:00
parent aa4c8ca5ba
commit 50cf966da7
8 changed files with 592 additions and 0 deletions
@@ -0,0 +1,87 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateShorakaTransactionsTable extends Migration
{
public function up()
{
Schema::create(
'shoraka_transactions',
function (Blueprint $table) {
$table->id();
// Rujukan pembiayaan dalam eRahn
$table->string('norujukan')->unique();
// Maklumat daripada Shoraka
$table->string('order_id')
->nullable()
->unique();
$table->string('status')
->default('PENDING');
$table->string('product_type')
->default('FINANCING');
$table->string('commodity_type');
$table->string('ownership_name');
$table->string('ownership_doc_no')
->nullable();
$table->decimal(
'order_amount',
15,
2
);
$table->decimal(
'murabaha_amount',
15,
2
);
$table->string('certificate_url')
->nullable();
$table->string('certificate_path')
->nullable();
// Simpan payload untuk audit dan troubleshooting
$table->json('request_payload')
->nullable();
$table->json('response_payload')
->nullable();
$table->json('callback_payload')
->nullable();
$table->unsignedInteger('attempt_count')
->default(0);
$table->text('error_message')
->nullable();
$table->timestamp('submitted_at')
->nullable();
$table->timestamp('completed_at')
->nullable();
$table->timestamps();
$table->index('status');
}
);
}
public function down()
{
Schema::dropIfExists('shoraka_transactions');
}
}