<?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('notice_user', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->comment("用户id");
            $table->string('open_id',50)->comment("用户open_id")->unique();
            $table->string('name',32)->nullable()->comment("用户姓名");
            $table->char('mobile',11)->nullable()->comment("用户手机号");
            $table->integer('role')->nullable()->comment("用户角色 1:主教练,2:副教练 3:客服");
            $table->integer('send_message')->comment("是否发送短信通知 0:关闭 1:开启")->default(0);
            $table->integer('send_wecom_message')->comment("是否发送短信通知 0:关闭 1:开启")->default(0);
            $table->timestamps();
        });
    }

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