<?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::create('settings', function (Blueprint $table) {
            $table->id();

            // Business Information
            $table->string('business_name')->nullable();
            $table->string('owner_name')->nullable();
            $table->string('email')->nullable();
            $table->string('phone')->nullable();

            // Order Settings
            $table->string('default_order_status')->default('Pending');
            $table->integer('low_stock_alert')->default(10);

            // Notification Settings
            $table->boolean('notify_low_stock')->default(true);
            $table->boolean('notify_new_order')->default(true);
            $table->boolean('notify_payment')->default(true);

            // Timestamps
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('settings');
    }
};