<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('admin_logs', function (Blueprint $table) {
            $table->id();
            $table->string('username', 50)->index()->comment('管理员账号');
            $table->integer('uu_level')->nullable()->comment('管理员等级');
            $table->dateTime('in_time')->nullable()->comment('进入时间');
            $table->integer('out_time')->nullable()->comment('离开时间');
            $table->text('caozuo')->nullable()->comment('操作详情');
            $table->integer('fs_sl')->default(0)->comment('封杀数量');
            $table->text('fs_name')->nullable()->comment('封杀名单');
            $table->integer('tr_sl')->default(0)->comment('踢人数量');
            $table->text('tr_name')->nullable()->comment('踢人名单');
            $table->integer('jg_sl')->default(0)->comment('警告数量');
            $table->text('jg_name')->nullable()->comment('警告名单');
            $table->integer('dj_sl')->default(0)->comment('冻结数量');
            $table->text('dj_name')->nullable()->comment('冻结名单');
            $table->integer('yjdj_sl')->default(0)->comment('永久冻结数量');
            $table->text('yjdj_name')->nullable()->comment('永久冻结名单');
            $table->integer('fip_sl')->default(0)->comment('封IP数量');
            $table->text('fip_name')->nullable()->comment('封IP名单');
            $table->integer('fjj_sl')->default(0)->comment('发奖金数量');
            $table->integer('fjy_sl')->default(0)->comment('发经验数量');
            $table->integer('flh_sl')->default(0)->comment('发老虎数量');
            $table->dateTime('jl_time')->nullable()->index()->comment('记录时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('admin_logs');
    }
};
