<?php

namespace Database\Seeders;

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


class UsersTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        //
        $users = [
            [
                'name' => '蕭芳伃',
                'account' => 'maa3',
                'role' => 'admin',
                'unit' => '亞新工程顧問有限公司',
                'password' => Hash::make('password'),
                'email' => 'maa3@gmail.com',
            ],
            [
                'name' => '陳禹伸',
                'account' => 'maa3444',
                'role' => 'admin',
                'unit' => '亞新工程顧問有限公司',
                'password' => Hash::make('3444'),
                'email' => 'maa3444@gmail.com',
            ],
            [
                'name' => '測試人員',
                'account' => 'maatester',
                'role' => 'admin',
                'unit' => '亞新工程顧問有限公司',
                'password' => Hash::make('test'),
                'email' => 'tester@gmail.com',
            ],
            [
                'name' => '劉庭宇',
                'account' => 'maa3520',
                'role' => 'admin',
                'unit' => '亞新工程顧問有限公司',
                'password' => Hash::make('3520'),
                'email' => 'maa3520@gmail.com',
            ]
        ];


        foreach ($users as $user) {
            User::create($user);
        }
    }
}
