<?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('customers', function (Blueprint $table) {
            $table->id('customer_id');
            $table->string('customer_name', 100);
            $table->bigInteger('contact_no');
            $table->string('email', 100);
            $table->unsignedBigInteger('id_card_type_id');
            $table->string('id_card_no', 20);
            $table->string('address', 100);
            
            $table->foreign('id_card_type_id')->references('id_card_type_id')->on('id_card_types');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('customers');
    }
};
