<?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('support_tickets', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('technician_id'); // Kisne madad maangi
            $table->string('type'); // 'sos' (Emergency) ya 'ticket' (Normal issue)
            $table->string('issue'); // Dikkat kya hai (e.g. Customer not picking call)
            $table->string('status')->default('open'); // open, resolved, closed
            $table->timestamps();
        });
    }

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