<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('agent_user_logs', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->unsigned()->comment("用户id");
            $table->integer('before_level')->unsigned()->comment("前一个等级");
            $table->integer('after_level')->unsigned()->comment("后一个等级");
            $table->string("desc")->nullable()->comment("描述");
            $table->timestamps();
        });
    }

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