Initialer Laravel Commit für BetiX
This commit is contained in:
36
database/migrations/2026_01_01_000006_create_kyc_table.php
Normal file
36
database/migrations/2026_01_01_000006_create_kyc_table.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('kyc_documents', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('category', 24); // identity | address | payment
|
||||
$table->string('type', 32); // passport | driver_license | id_card | bank_statement | utility_bill | other
|
||||
$table->string('status', 16)->default('pending'); // pending | approved | rejected
|
||||
$table->string('rejection_reason', 255)->nullable();
|
||||
$table->string('file_path');
|
||||
$table->string('mime', 100);
|
||||
$table->unsignedBigInteger('size');
|
||||
$table->timestamp('submitted_at')->nullable();
|
||||
$table->timestamp('reviewed_at')->nullable();
|
||||
$table->foreignId('reviewed_by')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['user_id', 'status']);
|
||||
$table->index('category');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('kyc_documents');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user