<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('job_listings', function (Blueprint $table) {
            $table->id();
            $table->string('title');
            $table->string('company');
            $table->string('location');
            $table->string('type')->default('Full-time'); // Full-time, Part-time, Freelance, Internship
            $table->decimal('salary_min', 12, 0)->nullable();
            $table->decimal('salary_max', 12, 0)->nullable();
            $table->text('requirements');
            $table->text('description');
            $table->text('benefits')->nullable();
            $table->boolean('is_active')->default(true);
            $table->timestamp('deadline')->nullable();
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('job_listings');
    }
};
