<?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('member_social_accounts', function (Blueprint $table) {
            $table->comment('社交账号管理');
            $table->increments('id');
            $table->unsignedBigInteger('user_id')->comment('用户编号');
            $table->string('platform')->default('')->comment('社交平台');
            $table->string('social_id')->default('')->comment('社交账号');
            $table->string('nickname')->nullable()->comment('昵称');
            $table->string('avatar')->nullable()->comment('头像');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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