<?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_up_country', function (Blueprint $table) {
            $table->id();
            $table->string('expense_number')->unique();
            $table->foreignId('user_id')->constrained('admins')->cascadeOnDelete();
            $table->foreignId('rayon_id')->constrained('rayon')->cascadeOnDelete();
            $table->date('tanggal');
            $table->string('tujuan');
            $table->integer('jarak');
            $table->integer('allowance');
            $table->integer('transport_dalkot');
            $table->integer('transport_ankot');
            $table->integer('hotel');
            $table->integer('total');
            $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_up_country');
    }
};
