<?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('admin_operation_logs', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('admin_id')->comment('操作用户的id');
            $table->string('action')->comment('操作');
            $table->string('target')->comment('类型');
            $table->unsignedBigInteger('target_id')->comment('类型ID');
            $table->text('details')->nullable()->comment('详细信息');
            $table->string('ip');
            $table->text('input')->nullable();
            $table->timestamps();

        });
    }

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