<?php

namespace Database\Seeders;

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

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $user1= User::create([
            'name'=>'Luis Fernando Pérez',
            'email'=>'fernandoestrp@outlook.es',
            'direccion'=>'Zacatenco mz 21 lt 2 san francisco cuautliquixca',
            'telefono'=>'5636287759',
            'password' => bcrypt('6686'),
            'code'=>1,
            'status'=>1
        ])->assignRole('Admin');

        $user1->plantelUsuarios()->sync(1);

        $user2= User::create([
            'name'=>'Antonio Azulito Real Luna',
            'email'=>'reydelfin@gmail.com',
            'direccion'=>'Zacatenco mz 21 lt 2 san francisco cuautliquixca',
            'telefono'=>'5636287758',
            'password' => bcrypt('2000'),
            'code'=>1,
            'status'=>1
        ])->assignRole('Promotor');
        $user2->plantelUsuarios()->sync([1,2,3]);
    }
}
