<?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('collaborator', function (Blueprint $table) {
            $table->id();
            $table->string('user_id', 50);
            $table->string('openid', 50)->unique();
            $table->string('avatar')->nullable()->comment('头像');
            $table->string('name')->nullable()->comment('姓名');
            $table->string('mobile', 15)->nullable()->comment('手机号');
            $table->text("intro")->nullable()->comment('简介');
            $table->text('specialty')->nullable()->comment("特长");
            $table->string('bio')->nullable()->comment("简历");
            $table->text("protocols")->nullable()->comment("合作协议");
            $table->text("diploma")->nullable()->comment("学历证书");
            $table->tinyInteger("status")->default(0)->comment("审核状态:0审核中,1审核通过,2拒绝");
            $table->string('reason')->nullable()->comment('拒绝原因');
            $table->string('filing_at',50)->nullable()->comment('申请日期');
            $table->string('audit_at',50)->nullable()->comment('审核日期');

            $table->softDeletes();
            $table->timestamps();
        });
    }

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