<?php
/**
 * Seeder Class
 *
 * @version     1.0.$Revision:$
 * @version     SVN: $Id:$
 * @package     bplan-base\globals
 * @subpackage  Seeders
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 * @copyright   Copyright (C) 2025, 2026 bplan-solutions GmbH & Co. KG <https://www.bplan-solutions.de/>
 * /Δ\
 */

namespace BplanBase\Globals\Database\Seeders\Dev;


use App\Models\User;
use BplanBase\Globals\Enums\UserAccessLevel;
use BplanBase\Globals\Models\Tenant;
use BplanBase\Globals\Setup\Logger;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;


/**
 * Seeder Class
 *
 * Seed development users with records and roles.
 *
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 */
class CombinedUserSeeder extends Seeder
{

    /**
     * Run the database seeds.
     *
     * @return void
     *
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function run()
    {
        $date = date('Y-m-d H:i:s');
        $env = strtolower(config('app.env'));

        $Tenant = Tenant::where('identifier', 'System')->first();

        $users = [
            [
                'data' => [
                    'access_level' => UserAccessLevel::Developer->name,
                    'email' => 'emilio.cannarozzo@bplan-solutions.de',
                    'internal' => 1,
                    'name' => 'Emilio Cannarozzo',
                ],
                'password' => true,
                'roles' => [
                    'Admin',
                ],

            ],
            [
                'data' => [
                    'access_level' => UserAccessLevel::Developer->name,
                    'email' => 'wassilios.meletiadis@bplan-solutions.de',
                    'internal' => 1,
                    'name' => 'Wassilios Meletiadis',
                ],
                'password' => true,
                'roles' => [
                    'Admin',
                ],
            ],
            [
                'data' => [
                    'access_level' => UserAccessLevel::Developer->name,
                    'email' => 'tolga.kocer@bplan-solutions.de',
                    'internal' => 1,
                    'name' => 'Tolga Kocer',
                ],
                'password' => true,
                'roles' => [
                    'Admin',
                ],

            ],
            [
                'data' => [
                    'access_level' => UserAccessLevel::Developer->name,
                    'email' => 'malte.bliefernicht@bplan-solutions.de',
                    'internal' => 1,
                    'name' => 'Malte Bliefernicht',
                ],
                'password' => true,
                'roles' => [
                    'Admin',
                ],

            ],
            [
                'data' => [
                    'access_level' => UserAccessLevel::Developer->name,
                    'email' => 'marco.odenthal@bplan-solutions.de',
                    'internal' => 1,
                    'name' => 'Marco Odenthal',
                ],
                'password' => true,
                'roles' => [
                    'Admin',
                ],

            ],
            [
                'data' => [
                    'access_level' => UserAccessLevel::Developer->name,
                    'email' => 'norbert.buendgen@bplan-solutions.de',
                    'internal' => 1,
                    'name' => 'Norbert Bündgen',
                ],
                'password' => true,
                'roles' => [
                    'Admin',
                ],

            ],
            [
                'data' => [
                    'access_level' => UserAccessLevel::Developer->name,
                    'email' => 'andrea.bockholt@bplan-solutions.de',
                    'internal' => 1,
                    'name' => 'Andrea Bockholt',
                ],
                'password' => true,
                'roles' => [
                    'Admin',
                ],

            ],
            [
                'data' => [
                    'access_level' => UserAccessLevel::Developer->name,
                    'email' => 'nicole.beth@bplan-solutions.de',
                    'internal' => 1,
                    'name' => 'Nicole Beth',
                ],
                'password' => true,
                'roles' => [
                    'Admin',
                ],

            ],

            // [
            //     'data' => [
            //         'access_level' => UserAccessLevel::Staff->name,
            //         'email' => 'test.admin@bplan-solutions.de',
            //         'internal' => 0,
            //         'name' => 'Test Admin',
            //         'tenant_id' => Tenant::where('identifier', '=', 'Sportbund')->first()->id,
            //     ],
            //     'password' => true,
            //     'roles' => [
            //         'Admin',
            //     ],

            // ],
        ];
        seed_users($users);

    } // run()


} // class CombinedUserSeeder extends Seeder {}
