<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('rapport_piece', function (Blueprint $table) {

            $table->id();
            $table->foreignId('rapport_id')->onDelete(null);
            $table->foreignId('piece_id')->onDelete(null);
            $table->integer('qte');
            $table->integer('remise');
            $table->integer('vetuste');
            $table->double('montant_ht');
            $table->timestamps();

        });
    }

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