<?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('voters', function (Blueprint $table) {
            $table->id();

            $table->unsignedBigInteger('serial_no')->unique();

            $table->string('name_bn');
            $table->string('name_en');

            $table->string('nid_bn')->unique();
            $table->string('nid_en')->unique();

            $table->string('father_name');
            $table->string('mother_name');

            $table->date('date_of_birth');

            $table->string('occupation')->nullable();
            $table->text('address');

            $table->string('area_code');
            $table->string('ward_no');
            $table->string('upazila');
            $table->string('district');

            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('voters');
    }
};
