<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        DB::statement("CREATE TABLE `ufutx_dynamic_report` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `type` varchar(32) NOT NULL COMMENT '举报类型',
  `square_id` int(11) DEFAULT NULL COMMENT '动态id',
  `user_id` int(11) NOT NULL COMMENT '举报人用户id',
  `to_user_id` int(11) DEFAULT NULL COMMENT '被举报人用户id',
  `status` tinyint(4) NOT NULL COMMENT '状态 0:未处理 1:已处理',
  `remark` text NOT NULL COMMENT '举报描述',
  `images` text COMMENT '举报图片',
  `created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`) USING BTREE,
  KEY `to_user_id` (`to_user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='动态举报表';");
    }

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