<?php

namespace Database\Seeders;

use App\Models\User;
use Database\Seeders\ItemSeeder;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Database\Seeders\CategorySeeder;
use Laravolt\Indonesia\Seeds\CitiesSeeder;
use Laravolt\Indonesia\Seeds\VillagesSeeder;
use Laravolt\Indonesia\Seeds\DistrictsSeeder;
use Laravolt\Indonesia\Seeds\ProvincesSeeder;
use Database\Seeders\AddressSeeder;

class DatabaseSeeder extends Seeder
{
    use WithoutModelEvents;

    /**
     * Seed the application's database.
     */
    public function run(): void
    {

        User::factory()->create([
            'name' => 'User',
            'email' => 'user@email.com',
            'password' => bcrypt('12345678'),
            'role' => 'customer',
        ]);

        User::factory()->create([
            'name' => 'Admin',
            'email' => 'admin@email.com',
            'password' => bcrypt('12345678'),
            'role' => 'admin',
        ]);

        User::factory()->create([
            'name' => 'Kurir',
            'email' => 'kurir@email.com',
            'password' => bcrypt('123123123'),
            'role' => 'courier',
        ]);

        $this->call([
            AuthorSeeder::class,
            CategorySeeder::class,
            ItemSeeder::class,
            ProvincesSeeder::class,
            CitiesSeeder::class,
            DistrictsSeeder::class,
            VillagesSeeder::class,
            AddressSeeder::class,
        ]);
    }
}
