<?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('products', function (Blueprint $table) {
            $table->decimal('cost_price', 12, 2)->nullable()->after('location');
            $table->decimal('price', 12, 2)->nullable()->after('cost_price');
            $table->decimal('member_price', 12, 2)->nullable()->after('price');
            $table->decimal('wholesale_price', 12, 2)->nullable()->after('member_price');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('products', function (Blueprint $table) {
            $table->dropColumn(['cost_price', 'price', 'member_price', 'wholesale_price']);
        });
    }
};
