<?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::table('products', function (Blueprint $table) {
            $table->string('currency_code', 3)->default('USD')->after('description');
            $table->decimal('original_price', 15, 2)->nullable()->after('price');
            $table->decimal('original_shipping_charge', 15, 2)->nullable()->after('shipping_charge');
        });
    }

    public function down(): void
    {
        Schema::table('products', function (Blueprint $table) {
            $table->dropColumn(['currency_code', 'original_price', 'original_shipping_charge']);
        });
    }
};