<?php

namespace Database\Seeders;

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

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     *
     * @return void
     */
    public function run()
    {
        \App\Models\User::factory()->create([
            'name' => 'Test User',
            'email' => 'test@example.com',
        ]);

        DB::table('users')->insert([
            'name' => 'Piniastudio',
            'email' => 'help@piniastudio.com',
            'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',
        ]);

        DB::table('company_types')->insert(
            ['name' => 'Sea']
        );
        
        DB::table('company_types')->insert(
            ['name' => 'Air']
        );

        $this->call([
            PermissionSeeder::class,
            RoleSeeder::class,
            CompaniesSeeder::class,
        ]);
    }
}

