<?php

declare(strict_types=1);

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('transactions', function (Blueprint $table) {
            $table->id();
            $table->boolean('invoiced')
                ->default(false);
            $table->unsignedBigInteger('payment_method_id');
            $table->string('payment_method_name');
            $table->integer('amount_of_transactions');
            $table->decimal('turnover');
            $table->timestamp('date_from');
            $table->timestamp('date_until');
            $table->foreignId('merchant_id')
                ->constrained();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('transactions');
    }
};
