<?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()
    {
        //之前主教练,副教练,客服人员结构就已经这么low了,任务要紧,不优化,沿用之前逻辑,有缘人以后有时间你们再优化吧,nice,弃坑
        Schema::create('chef_user', function (Blueprint $table) {
            $table->id();
            $table->integer("partner_id")->unsigned();
            $table->string('openid', 50)->unique();
            $table->string('agree_user', 50)->nullable()->comment('对服务满意的客户名字');
            $table->string('disagree_user', 50)->nullable()->comment('对服务不满意的客户名字');
            $table->text("outlook")->nullable()->comment("看法");
            $table->text("reason")->nullable()->comment("原因");
            $table->text("idea")->nullable()->comment("建议");
            $table->text("think")->nullable()->comment("认为");
            $table->integer("customer_num")->default(0)->comment("服务客户数量");
            $table->integer('status')->default(0)->comment('审核状态:0审核中,1审核通过,2拒绝');
            $table->string('refusal_reason')->nullable()->comment('拒绝原因');
            $table->string('filing_at',50)->nullable()->comment('申请日期');
            $table->timestamp('audit_at')->nullable()->comment('审核时间');
            $table->timestamps();
        });
    }

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