<?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('point_settings', function (Blueprint $table) {
            $table->id();
            $table->decimal('egp_per_point', 10, 2)->default(10);
            $table->decimal('point_value_in_egp', 10, 2)->default(1);
            $table->timestamps();
        });

        DB::table('point_settings')->insert([
            'egp_per_point' => 10,
            'point_value_in_egp' => 1,
            'created_at' => now(),
            'updated_at' => now(),
        ]);
    }

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