<?php
namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class DatabaseSeeder extends Seeder
{
    use WithoutModelEvents;

    public function run(): void
    {
        $this->call(ProvinceSeeder::class);
        $this->call(MunicipalitySeeder::class);
        $this->call(SettingSeeder::class);
        $this->call(HomepageSlideSeeder::class);
        $this->call(CategorySeeder::class);
        $this->call(BrandSeeder::class);

        $this->call(StoreSeeder::class);
        $this->call(ProductSeeder::class);
        $this->call(CampaignSeeder::class);
        $this->call(NewsSeeder::class);
        $this->call(PartnerSeeder::class);
        $this->call(VacancySeeder::class);
        $this->call(EditorialSeeder::class);

        User::updateOrCreate(
            ['email' => 'admin@mangole.ao'],
            [
                'name' => 'Administrador Mangolê',
                'password' => Hash::make('password'),
                'email_verified_at' => now(),
            ]
        );

        User::updateOrCreate(
            ['email' => 'marketing@mangole.ao'],
            [
                'name' => 'Marketing Mangolê',
                'password' => Hash::make('password'),
                'email_verified_at' => now(),
            ]
        );
    }
}
