<?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('satisfactions', function (Blueprint $table) {
            $table->id();
            $table->foreignId('user_id')->constrained();
            // Pertanyaan 1-15 dengan nilai 1-5
            $table->integer('q1')->comment('Kesesuaian persyaratan pelayanan');
            $table->integer('q2')->comment('Kejelasan persyaratan administrasi');
            $table->integer('q3')->comment('Kemudahan prosedur pelayanan');
            $table->integer('q4')->comment('Kecepatan waktu pelayanan');
            $table->integer('q5')->comment('Ketepatan jam buka pelayanan');
            $table->integer('q6')->comment('Kewajaran biaya/tarif pelayanan');
            $table->integer('q7')->comment('Kesesuaian produk pelayanan');
            $table->integer('q8')->comment('Kompetensi/kemampuan petugas');
            $table->integer('q9')->comment('Kesopanan dan keramahan petugas');
            $table->integer('q10')->comment('Kualitas sarana dan prasarana');
            $table->integer('q11')->comment('Kebersihan dan kenyamanan ruangan');
            $table->integer('q12')->comment('Kebersihan toilet/kamar mandi');
            $table->integer('q13')->comment('Kualitas tempat parkir');
            $table->integer('q14')->comment('Penanganan saran dan pengaduan');
            $table->integer('q15')->comment('Kemudahan akses sarana pengaduan');
            $table->text('kritik_saran')->nullable()->comment('Kritik dan saran tambahan');
            $table->timestamps();
        });
    }

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