<?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('invoice_reports', function (Blueprint $table) {
            $table->id();
            $table->string('internal_id')->nullable();

            $table->foreignId('customer_id')->constrained();

            $table->date('date_start');
            $table->date('date_end');
            $table->boolean('filter_paid');
            $table->float('subtotal', 2)->default(0);
            $table->float('pst', 2)->default(0);
            $table->float('gst', 2)->default(0);
            //            $table->float('total', 2)->default(0);

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

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