<?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('wang_yi_yun_user', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->nullable()->comment('平台用户ID');
            $table->string('accid', 32)->comment('网易云通信ID')->unique();
            $table->string('name', 64)->nullable()->comment('昵称');
            $table->string('icon', 1024)->nullable()->comment('头像');
            $table->string('token', 128)->nullable();
            $table->string('sign', 256)->nullable()->comment('用户签名');
            $table->string('email', 64)->nullable()->comment('邮箱');
            $table->string('birth', 16)->nullable()->comment('生日');
            $table->string('mobile', 32)->nullable()->comment('手机号');
            $table->tinyInteger('gender')->default(0)->comment('0表示未知，1表示男，2表示女');
            $table->text('ex', 1024)->nullable()->comment('名片扩展');
            $table->timestamps();
        });
    }

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