<?php

use think\migration\Seeder;

class SysUserInit extends Seeder
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run(): void
    {
        $data = [
            ["id" => 1, "username" => "admin", "password" => "75a8eab4d31428c67ac48ad9fa0b707c", "salt" => "edefslowjkdsfjkl", "role_id" => 1, "nickname" => "超级管理员", "avatar" => null, "mobile" => null, "email" => null, "delete_disable" => 1, "status" => 1, "created_at" => "2024-12-31 15:31:16", "updated_at" => "2025-03-01 11:47:21", "deleted_at" => null]
        ];

        $table = $this->table('sys_user');

        // empty the table
        $table->truncate();

        // insert data
        $table->insert($data)->save();
    }
}