add card pins

This commit is contained in:
2025-11-02 22:22:36 +05:00
parent fa304450cb
commit bdcb4811c4
4 changed files with 200 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
SChema::create('card_pin_orders', function (Blueprint $table) {
$table->id();
$table->string('unique_id')->nullable()->unique();
$table->foreignId('user_id')->constrained('users')->cascadeOnDelete();
$table->foreignId('card_type_id')->constrained('card_types')->restrictOnDelete();
$table->string('card_number');
// Region & Branch
$table->string('region', 2);
$table->foreignId('branch_id')->constrained('branches')->restrictOnDelete();
// Customer name,surname,patronic name
$table->string('customer_name')->index();
$table->string('customer_surname')->index();
$table->string('customer_patronic_name')->nullable();
$table->date('born_at')->nullable();
$table->string('phone')->index()->nullable();
$table->string('passport_serie')->index();
$table->string('passport_id')->index();
$table->text('passport_one')->nullable();
$table->text('passport_two')->nullable();
$table->text('passport_three')->nullable();
$table->text('passport_four')->nullable();
$table->string('status')->nullable();
$table->string('notes')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};