<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('wallet_transactions', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('technician_id'); // Kis technician ka paisa hai
            $table->string('booking_id')->nullable(); // Kis job (AC Service) se aaya
            $table->string('type'); // 'earning' (Kamayi) ya 'commission' (Platform Fee)
            $table->integer('amount'); // Kitna paisa (+ ya -)
            $table->string('description'); // Detail (Jaise: Commission deducted)
            $table->timestamps();
        });
    }

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