<?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('tauxes', function (Blueprint $table) {

            $table->id();
            $table->double('taux_1')->nullable();
            $table->integer('t1')->nullable();
            $table->double('taux_2')->nullable();
            $table->integer('t2')->nullable();
            $table->double('taux_3')->nullable();
            $table->integer('t3')->nullable();
            $table->double('taux_mo_peinture')->nullable();
            $table->integer('tp')->nullable();
            $table->double('forfait_ing_pieces')->nullable();
            $table->double('remise_facture')->nullable();
            $table->double('remise_piece')->nullable();
            $table->double('remise_sur_total_mo')->nullable();
            // $table->double('frais_additionel_calcule_sur_le_total_ht')->nullable();
            $table->double('tva_deductible')->nullable();
            $table->double('forfait_mo_1')->nullable();
            $table->double('forfait_mo_2')->nullable();
            $table->double('forfait_mo_3')->nullable();
            $table->double('forfait_peinture')->nullable();
            $table->double('taux_ing_opaque')->nullable();
            $table->double('taux_ing_opaque_vernis')->nullable();
            $table->double('taux_ing_metal')->nullable();
            $table->double('taux_ing_metal_vernis')->nullable();
            $table->double('taux_ing_nacre_vernis')->nullable();
            $table->double('remise_facture1')->nullable();
            $table->double('remise_sur_total_mo_peinture')->nullable();
            // $table->double('majoration_des_frais_additionels')->nullable();
            $table->double('franchise')->nullable();
            $table->double('franchise_fix')->nullable();
            // $table->foreignId('type_ingredient_id')->nullable()->constrained()->onDelete(null);

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

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