<?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_info_records', function (Blueprint $table) {
            $table->comment('代理商信息认证记录');
            $table->increments('id');
            $table->unsignedBigInteger('agent_id')->comment('代理商编号');
            $table->string('company_name')->default('')->comment('公司名称');
            $table->string('company_address')->default('')->comment('公司地址');
            $table->string('contact_name')->default('')->comment('联系人姓名');
            $table->string('contact_mobile')->default('')->comment('联系人手机号');
            $table->string('business_area')->default('')->comment('经营区域');
            $table->string('business_scope')->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('agent_info_records');
    }
};
