<?php

use Illuminate\Database\Seeder;
use App\Models\Administrator;
use Illuminate\Support\Facades\DB;

class AdministratorSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        Administrator::truncate();
        Administrator::create([
            'username' => 'admin',
            'password' => password_hash(123321, PASSWORD_BCRYPT),
            'avatar' => '/static/img/default/avatar.png',
            'add_user_id' => 1,
            'last_login_ip' => '127.0.0.1',
            'last_login_time' => \Carbon\Carbon::now(),
            'is_protected' => 1,
        ]);
        Administrator::create([
            'username' => 'kotana',
            'password' => password_hash(123321, PASSWORD_BCRYPT),
            'avatar' => '/static/img/default/avatar.png',
            'add_user_id' => 1,
            'last_login_ip' => '127.0.0.1',
            'last_login_time' => \Carbon\Carbon::now()
        ]);
    }
}
