<?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('qr_users', function (Blueprint $table) {
            $table->id('qr_user_id');
            $table->string('qr_user_name');
            $table->string('qr_user_email');
            $table->string('qr_user_phone');
            $table->string('qr_user_photo')->Nullable();
            $table->string('qr_user_state')->default(1);
            // If == 1 it is NEW
            $table->integer('qr_user_newState')->default(1);
            // If == 1 it is NEW
            $table->string('qr_user_website_link')->nullable();
            $table->foreignId('qr_user_websiteuser_id')->references('website_user_id')->on('website_users');
            $table->foreignId('qr_user_country_id')->references('country_id')->on('countries');
            $table->timestamps();

        });
    }

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