<?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('qrcode_records', function (Blueprint $table) {
            $table->id();
            $table->string('outlet_id');        // 店號
            $table->string('outlet_name');      // 店名
            $table->string('name');             // 姓名
            $table->string('phone');            // 電話（加密後）
            $table->timestamp('qr_generated_at'); // QR Code 產生時間
            $table->timestamps();
        });
    }

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