<?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('warehouses', function (Blueprint $table) {
            $table->string('type')->default('standard')->after('description')->comment('倉庫業務類型 (enum)');
            $table->string('license_plate')->nullable()->after('type')->comment('車牌號碼 (移動倉用)');
            $table->string('driver_name')->nullable()->after('license_plate')->comment('司機姓名 (移動倉用)');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('warehouses', function (Blueprint $table) {
            $table->dropColumn(['type', 'license_plate', 'driver_name']);
        });
    }
};
