<?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('items', function (Blueprint $table) {
            $table->decimal('dine_in_price', 10, 2)->nullable()->after('price');
            $table->decimal('delivery_price', 10, 2)->nullable()->after('dine_in_price');
            $table->decimal('takeaway_price', 10, 2)->nullable()->after('delivery_price');
            $table->decimal('gst_percentage', 5, 2)->default(5.00)->after('takeaway_price');
            $table->boolean('tax_inclusive')->default(false)->after('gst_percentage');
            $table->boolean('available_dine_in')->default(true)->after('tax_inclusive');
            $table->boolean('available_delivery')->default(true)->after('available_dine_in');
            $table->boolean('available_takeaway')->default(true)->after('available_delivery');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('items', function (Blueprint $table) {
            //
        });
    }
};
