<?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('companies', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('name_ar')->nullable();
            $table->string('dial_code')->nullable();
            $table->string('phone')->nullable();
            $table->string('brand_logo')->nullable();
            $table->text('description')->nullable();
            $table->text('description_ar')->nullable();
            $table->string('address')->nullable();
            $table->string('country')->nullable();
            $table->string('emirates')->nullable();
            $table->string('city')->nullable();
            $table->string('trade_license')->nullable();
            $table->date('trade_license_expiry')->nullable();
            $table->smallInteger('status')->default(0)->comment('0 - Inactive, 1 - Active');
            $table->integer('user_id');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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