<?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('service_assets', function (Blueprint $table) {
            $table->id();
            $table->foreignId('ticket_id')->unique()->constrained('service_tickets')->cascadeOnDelete();
            $table->string('photo_entry')->nullable();   // path foto saat terima
            $table->string('sig_entry')->nullable();     // path tanda tangan saat terima
            $table->string('photo_exit')->nullable();    // path foto saat serah terima
            $table->string('sig_exit')->nullable();      // path tanda tangan saat serah terima
            $table->timestamps();
        });
    }

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