<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shops', function (Blueprint $table) {
            $table->id();
            $table->string('display_name');
            $table->text('description')->nullable();

            $table->string('email')->nullable();
            $table->string('phone')->nullable();

            $table->string('chat_url')->nullable();
            $table->string('facebook_url')->nullable();
            $table->string('website_url')->nullable();

            $table->text('image_url')->nullable();
            $table->text('background_image_url')->nullable();

            $table->string('business_name')->nullable();
            $table->string('register_number')->nullable();
            $table->string('type')->nullable();
            $table->string('address')->nullable();
            $table->foreignId('province_id')->nullable();
            $table->string('contact_person')->nullable();
            $table->string('contact_person_phone')->nullable();


            $table->text('latitude')->nullable();
            $table->text('longitude')->nullable();
            $table->string('google_map_place_url')->nullable();

            $table->double('rating')->default(0.0);
            $table->boolean('status')->default(true);
            $table->timestamps();
        });
    }

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