<?php

use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('users')->insert([
            'username' => 'admin',
            'password' => bcrypt('admin'),
            'level' => 'admin',
            'saldo' => 10000000,
            'register_date' => date('Y-m-d'),
            'expired_date' => date('Y-m-d', strtotime("+10 day")),
            'register_by' => 'admin',
            'status' => 'aktif',
            'created_at' => date('Y-m-d H:i:s'),
            'updated_at' => date('Y-m-d H:i:s')
        ]);
        DB::table('users')->insert([
            'username' => 'member',
            'password' => bcrypt('member'),
            'level' => 'member',
            'register_date' => date('Y-m-d'),
            'expired_date' => date('Y-m-d', strtotime("+10 day")),
            'register_by' => 'admin',
            'status' => 'aktif',
            'created_at' => date('Y-m-d H:i:s'),
            'updated_at' => date('Y-m-d H:i:s')
        ]);
        DB::table('users')->insert([
            'username' => 'member2',
            'password' => bcrypt('member2'),
            'level' => 'member',
            'register_date' => date('Y-m-d'),
            'expired_date' => date('Y-m-d', strtotime("+10 day")),
            'register_by' => 'reseller',
            'status' => 'aktif',
            'created_at' => date('Y-m-d H:i:s'),
            'updated_at' => date('Y-m-d H:i:s')
        ]);
        DB::table('users')->insert([
            'username' => 'priority',
            'password' => bcrypt('priority'),
            'level' => 'priority',
            'register_date' => date('Y-m-d'),
            'expired_date' => date('Y-m-d', strtotime("+10 day")),
            'register_by' => 'admin',
            'status' => 'aktif',
            'created_at' => date('Y-m-d H:i:s'),
            'updated_at' => date('Y-m-d H:i:s')
        ]);
        DB::table('users')->insert([
            'username' => 'reseller',
            'password' => bcrypt('priority'),
            'level' => 'priority',
            'register_date' => date('Y-m-d'),
            'expired_date' => date('Y-m-d', strtotime("+10 day")),
            'register_by' => 'admin',
            'status' => 'aktif',
            'created_at' => date('Y-m-d H:i:s'),
            'updated_at' => date('Y-m-d H:i:s')
        ]);
        DB::table('users_delay')->insert([
            'user_id' => 1
        ]);
        DB::table('users_delay')->insert([
            'user_id' => 2
        ]);
        DB::table('users_delay')->insert([
            'user_id' => 3
        ]);
        DB::table('users_delay')->insert([
            'user_id' => 4
        ]);
        DB::table('users_delay')->insert([
            'user_id' => 5
        ]);
    }
}
