<?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('repair_job_cards', function (Blueprint $table) {
            $table->id();
            $table->string('customer_name');
            $table->string('customer_phone');
            $table->string('device_model');
            $table->string('imei', 15)->nullable();
            $table->text('condition_map')->nullable(); 
            $table->string('passcode')->nullable(); 
            $table->json('pre_repair_checklist')->nullable(); 
            $table->string('status')->default('Received'); 
            $table->decimal('repair_cost', 10, 2)->nullable();
            $table->unsignedBigInteger('technician_id')->nullable();
            $table->timestamps();
        });
    }

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