<?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::table('users', function (Blueprint $table) {
            $table->string('gender')->nullable()->after('remember_token');
            $table->date('dob')->nullable()->after('gender');
            $table->string('profile_image')->nullable()->after('dob');
            $table->string('customer_group')->default('General')->after('profile_image');
            $table->string('status')->default('active')->after('customer_group');
            $table->timestamp('phone_verified_at')->nullable()->after('status');
            $table->timestamp('last_login_at')->nullable()->after('phone_verified_at');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn([
                'gender',
                'dob',
                'profile_image',
                'customer_group',
                'status',
                'phone_verified_at',
                'last_login_at',
            ]);
        });
    }
};
