<?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('moderators', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->unsigned()->comment("用户id")->index();
            $table->string('name', 20)->comment("真实姓名");
            $table->string('birthday', 10)->comment("生日");
            $table->tinyInteger('sex')->comment("性别 1：男，2：女");
            $table->date('apply_date')->nullable()->comment("申请日期");
            $table->date('dma_date')->nullable()->comment("DMA起始日期");
            $table->string('mobile',20)->comment('联系电话');
            $table->text('reason')->comment("理由");
            $table->text('promote')->comment("获得提升");
            $table->text("quality")->comment("需要哪些素质");
            $table->text('suggest')->comment("有哪些建议");
            $table->tinyInteger('status')->comment("状态：0：未审核，1：通过，-1：拒绝");
            $table->text('content')->nullable()->comment("审核理由");
            $table->timestamps();
        });
    }

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