<?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('client_employments', function (Blueprint $table) {
            $table->id();

            $table->foreignId('user_id')
                ->constrained()
                ->cascadeOnDelete();

            $table->string('employment_type');
            $table->string('company_name')->nullable();
            $table->string('job_title')->nullable();
            $table->decimal('monthly_income', 12, 2)->nullable();
            $table->string('work_experience')->nullable();
            $table->string('office_city')->nullable();

            $table->timestamps();

            $table->unique('user_id');
        });
    }

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