<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Seeder;
use App\Enums\UserTypeEnum;

class UserSeeder extends Seeder
{
    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        $user = User::firstOrNew([
            'name' => 'Suporte',
            'email' => 'suporte@softpar.inf.br',
            'password' => 'S@ft2080.',
            'type' => UserTypeEnum::ADMIN,
        ]);
        $user->save();

        $user = User::firstOrNew([
            'name' => 'Usuário Teste',
            'email' => 'usuario.teste@softpar.inf.br',
            'password' => 'S@ft2080.',
            'type' => UserTypeEnum::USER,
        ]);
        $user->save();

        $user = User::firstOrNew([
            'name' => 'Prestador Teste',
            'email' => 'prestador.teste@softpar.inf.br',
            'password' => 'S@ft2080.',
            'type' => UserTypeEnum::PROVIDER,
        ]);
        $user->save();

        $user = User::firstOrNew([
            'name' => 'Cliente Teste',
            'email' => 'cliente.teste@softpar.inf.br',
            'password' => 'S@ft2080.',
            'type' => UserTypeEnum::CLIENT,
        ]);
        $user->save();
    }
}
