<?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('aduan_tps', function (Blueprint $table) {
            $table->id();
            $table->foreignId('lokasi_tps_id')
                ->constrained('lokasi_tps')
                ->onDelete('cascade');

            $table->string('nama_pelapor');
            $table->string('no_pelapor');
            $table->text('isi_aduan');
            $table->date('tanggal_aduan');
            $table->string('bukti_foto')->nullable();
            $table->timestamps();
        });
    }

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