<?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('coach_real_auth_records', function (Blueprint $table) {
            $table->comment('技师实名认证记录');
            $table->increments('id');
            $table->unsignedBigInteger('coach_id')->comment('技师编号');
            $table->string('real_name')->default('')->comment('真实姓名');
            $table->string('id_card')->default('')->comment('身份证号');
            $table->string('id_card_front_photo')->default('')->comment('身份证正面照片');
            $table->string('id_card_back_photo')->default('')->comment('身份证反面照片');
            $table->string('id_card_hand_photo')->default('')->comment('手持身份证照片');
            $table->string('auditor')->nullable()->comment('审核人');
            $table->timestamp('audit_time')->nullable()->comment('审核时间');
            $table->string('audit_remark')->nullable()->comment('审核回执');
            $table->string('state')->default('pending')->comment('状态');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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