<?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::table('service_tickets', function (Blueprint $table) {
            $table->json('final_check_items')->nullable()->after('final_check_notes');
            $table->timestamp('ready_at')->nullable()->after('final_check_passed_at');
        });
    }

    public function down(): void
    {
        Schema::table('service_tickets', function (Blueprint $table) {
            $table->dropColumn([
                'final_check_items',
                'ready_at',
            ]);
        });
    }
};
