<?php

namespace Modules\Employee\Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Modules\Core\Database\Seeders\Traits\DisableForeignKeys;
use Modules\Core\Enums\StatusEnum;
use Modules\Employee\Models\Project;

class ProjectSeeder extends Seeder
{
    use DisableForeignKeys, WithoutModelEvents;

    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $this->disableForeignKeys();

        DB::table('projects')->truncate();

        Project::insert([
            [
                'name'        => 'Bangladesh Thalassemia Samity',
                'short_name'  => 'BTS',
                'reg_number'  => 111111,
                'status'      => StatusEnum::ACTIVE,
            ],
            [
                'name'        => 'Bangladesh Thalassemia Hospital',
                'short_name'  => 'BTH',
                'reg_number'  => 222222,
                'status'      => StatusEnum::ACTIVE,
            ],
            [
                'name'        => 'Bangladesh Thalassemia Samity Hospital',
                'short_name'  => 'BTSH',
                'reg_number'  => 333333,
                'status'      => StatusEnum::ACTIVE,
            ],
        ]);

        $this->enableForeignKeys();
    }
}
