<?php

namespace App\Installer;

use App\Enumerations\UserRole;
use App\Models\Tenant;
use App\Models\User;

class DevelopmentDataSeeder {
    public function execute() {
        $this->installTenants();
        $this->installUsers();
    }



    private function installTenants() {
        Tenant::create([
            'slug' => 'wilde-moehre',
            'name' => 'Stamm Wilde Möhre',
            'url' => 'wilde-moehre.mareike.local',
            'account_name' => 'Bund der Pfadfinder*innen Landesverband Sachsen e.V. - Stamm Wilde Möhre',
            'account_iban' => 'DE12345678901234567890',
            'account_bic' => 'GENODEF1S10',
            'email' => 'test@example1.com',
            'city' => 'Halle (Saale)',
            'postcode' => '06120',
            'is_active_local_group' => true,
            'has_active_instance' => true,
        ]);
    }

    private function installUsers() {
        User::create([
            'firstname' => 'Development',
            'lastname' => 'User',
            'user_role_main' => UserRole::USER_ROLE_ADMIN,
            'user_role_local_group' => UserRole::USER_ROLE_GROUP_LEADER,
            'local_group' => 'wilde-moehre',
            'email' => 'th.guenther@saale-mail.de',
            'password' => bcrypt('development'),
            'username' => 'development',
            'active' => true,
        ]);
    }
}
