<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class EmploymentTypeSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $employmentTypes = [
            [
                'name' => 'Regular',
                'plantilla' => null,
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'name' => 'Probationary',
                'plantilla' => true,
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'name' => 'Contractual',
                'plantilla' => false,
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'name' => 'Project Personnel',
                'plantilla' => true,
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'name' => 'Casual',
                'plantilla' => false,
                'created_at' => now(),
                'updated_at' => now(),
            ],
        ];

        DB::table('employment_types')->insert($employmentTypes);
    }

    public function reset() {
        \App\Models\EmploymentType::truncate();
    }
}
