<?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('bookings', function (Blueprint $table) {
            $table->decimal('weight_charge', 10, 2)->default(0)->after('weight_kg');
            $table->decimal('volume_charge', 10, 2)->default(0)->after('volume_cbm');
            $table->decimal('carton_charge', 10, 2)->default(0)->after('carton_count');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('bookings', function (Blueprint $table) {
            $table->dropColumn(['weight_charge', 'volume_charge', 'carton_charge']);
        });
    }
};
