<?php

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

class CreatePengeluaransTable extends Migration
{
    public function up()
    {
        Schema::create('pengeluarans', function (Blueprint $table) {
            $table->id();
            $table->date('tanggal');
            $table->string('kategori');
            $table->string('nama');
            $table->decimal('jumlah', 15, 2); // nominal
            $table->decimal('harga', 15, 2)->nullable(); // nominal
            $table->integer('quantity')->nullable(); // jika barang
            $table->text('keterangan')->nullable(); // opsional
            $table->string('bukti')->nullable(); // 🆕 kolom bukti file
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('pengeluarans');
    }
}
