<?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('form_vehicle_running_cost', function (Blueprint $table) {
            $table->id();
            $table->string('expense_number')->unique();
            $table->foreignId('user_id')->constrained('admins')->cascadeOnDelete();
            $table->dateTime('tanggal');
            $table->integer('liter');
            $table->integer('total');
            $table->integer('jarak');
            $table->string('tipe_bensin');
            $table->string('nopol');
            $table->text('keterangan');
            $table->string('bukti1')->nullable();
            $table->string('bukti2')->nullable();
            $table->string('bukti3')->nullable();
            $table->string('account_number');
            $table->string('status');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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