<?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('contacts', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('business_id');
            $table->string('first_name');
            $table->string('last_name');
            $table->string('job_title');
            $table->unsignedBigInteger('company_id');
            $table->string('department');
            $table->enum('gender', ['male', 'female', 'other']);
            $table->date('date_of_birth');
            $table->string('address_1');
            $table->string('address_2')->nullable();
            $table->string('city');
            $table->string('province');
            $table->string('zip_code');
            $table->unsignedBigInteger('country_id');
            $table->unsignedBigInteger('contact_owner_id');
            $table->unsignedBigInteger('marketing_source_id');
            $table->unsignedBigInteger('industry_id');
            $table->text('description')->nullable();
            $table->string('skype_id')->nullable();
            $table->unsignedBigInteger('stage_id');
            $table->enum('status', ['active', 'inactive', 'archived'])->default('active');
            $table->timestamps();
        });
    }

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