<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\User;
use App\Models\Administradores;

use Illuminate\Support\Facades\Crypt;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     *
     * @return void
     */
    public function run()
    {
        /*$costosUser = User::create([
            'name' => 'Costos API',
            'email' => 'api@gestioncostos',
            'password' => bcrypt('2Mrds8*%odAgagdgei@wa@¡3425432?*5mhjobspmkwdr$%'),
            'email_verified_at' => date('Y-m-d h:i:s')
        ]);*/

        $administrador = Administradores::create([
            'adm_cuenta' => 'hospitalia.admin',
            'adm_contrasena' => \Crypt::encryptString('HospitaliaAdmin2022*'),
            'adm_nombre' => 'Hospitalia',
            'adm_correo_elec' => 'gestioncostos@synergiasa.com',
            'adm_llave' => \Crypt::encryptString('2Mrds8*%odAgagdgei@wa@')
        ]);

        /*$roles = json_decode(\File::get(storage_path('dbParams/roles.json')), true);
        \DB::table('roles')->insert($roles);

        $departamentos = json_decode(\File::get(storage_path('dbParams/departamentos.json')), true);
        \DB::table('departamentos')->insert($departamentos);

        $municipios = json_decode(\File::get(storage_path('dbParams/municipios.json')), true);
        \DB::table('municipios')->insert($municipios);

        $elementos = json_decode(\File::get(storage_path('dbParams/elementos.json')), true);
        \DB::table('elementos')->insert($elementos);

        $naturalezaCuenta = json_decode(\File::get(storage_path('dbParams/naturaleza_cuenta.json')), true);
        \DB::table('naturaleza_cuenta')->insert($naturalezaCuenta);

        $tipoRecurso = json_decode(\File::get(storage_path('dbParams/tipo_recurso.json')), true);
        \DB::table('tipo_recurso')->insert($tipoRecurso);

        $caracterRecurso = json_decode(\File::get(storage_path('dbParams/caracter_recurso.json')), true);
        \DB::table('caracter_recurso')->insert($caracterRecurso);

        $basesDistribucion = json_decode(\File::get(storage_path('dbParams/bases_distribucion.json')), true);
        \DB::table('bases_distribucion')->insert($basesDistribucion);

        $regimen = json_decode(\File::get(storage_path('dbParams/regimenes.json')), true);
        \DB::table('regimen')->insert($regimen);

        $modulos = json_decode(\File::get(storage_path('dbParams/modulos.json')), true);
        \DB::table('modulos')->insert($modulos);*/
    }
}
