<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use PhpParser\Node\NullableType;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('vendors', function (Blueprint $table) {
            $table->id('vendor_id');
            $table->string('vendor_name');
            $table->string('vendor_email');
            $table->string('vendor_phone');
            $table->string('vendor_photo')->Nullable();
            $table->string('vendor_state')->default(1);
            $table->string('custom_domain')->nullable()->after('slug');

            // If == 1 it is NEW
            $table->integer('vendor_newState')->default(1);
            // If == 1 it is NEW

            // If == 0 it is OFF
            $table->integer('vendor_dashboardAccount_reminder')->default(1);
            // If == 0 it is OFF

            $table->string('vendor_website_link')->nullable();
            $table->foreignId('vendor_websiteuser_id')->references('website_user_id')->on('website_users');
            $table->foreignId('vendor_country_id')->references('country_id')->on('countries');
            $table->timestamps();
        });
    }

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