<?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('careers', function (Blueprint $table) {
            $table->id();
            $table->string('title');
            $table->string('slug')->unique();
            $table->text('description');
            $table->text('responsibilities')->nullable();
            $table->text('requirements')->nullable();
            $table->text('benefits')->nullable();
            $table->string('location');
            $table->string('job_location')->nullable();
            $table->string('department')->nullable();
            $table->enum('employment_type', ['full-time', 'part-time', 'contract', 'internship', 'remote'])->default('full-time');
            $table->string('education')->nullable();
            $table->string('contact_email')->nullable();
            $table->string('contact_phone')->nullable();
            $table->string('skills')->nullable();
            $table->string('industry')->nullable();
            $table->string('working_hours')->nullable();
            $table->string('salary_range')->nullable();
            $table->string('base_salary')->nullable();
            $table->boolean('is_active')->default(true);
            $table->date('date_posted')->nullable();
            $table->date('valid_through')->nullable();
            $table->timestamps();
        });
    }

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