<?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('inbound_histories', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('inbound_billing_requests_id')->index();
            $table->longText('days')->comment = 'JSON format {[{date:(moment date), hours}]}';
            $table->double('other_expense', 10, 2)->comment = 'other expense';
            $table->text('notes')->nullable()->comment = 'Loaner notes';
            $table->text('client_request')->nullable()->comment = 'Client request message';
            $table->timestamps();
        });
    }

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