<?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::create('quote_items', function (Blueprint $table) {
            $table->id(); $table->unsignedBigInteger('quote_id')->index(); $table->foreignId('product_id')->nullable()->constrained()->nullOnDelete(); $table->string('product_name'); $table->decimal('quantity',14,2); $table->decimal('unit_price',14,2); $table->decimal('line_total',14,2); $table->timestamps();
        });
    }

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