<?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('role')->nullable()->after('password');
            $table->string('phone_number')->nullable()->after('role');
            $table->text('address')->nullable()->after('phone_number');
            $table->decimal('latitude', 10, 7)->nullable()->after('address');
            $table->decimal('longitude', 10, 7)->nullable()->after('latitude');
            $table->text('shop_description')->nullable()->after('longitude');
            $table->string('profile_photo')->nullable()->after('shop_description');
            $table->timestamp('last_login_at')->nullable()->after('profile_photo');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn([
                'role',
                'phone_number',
                'address',
                'latitude',
                'longitude',
                'shop_description',
                'profile_photo',
                'last_login_at',
            ]);
        });
    }
}; 