<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('mobile')->nullable();
            $table->integer('otp')->nullable();
            $table->string('email')->unique()->nullable();
            $table->timestamp('email_verified_at')->nullable();
            $table->string('password')->nullable();
            $table->rememberToken();
            $table->foreignId('current_team_id')->nullable();
            $table->text('profile_photo_path')->nullable();
            $table->integer('userType')->default(0);
            $table->text('social_id')->nullable();
            $table->text('social_pic')->nullable();
            $table->text('social_token')->nullable();
            $table->integer('register_type')->default(0)->comment("1= web/app, 2 = facebook, 3 = google, 0 = other");
            $table->text('firebase_token')->nullable();
            $table->timestamps();
            $table->integer('status')->default(1)->comment("1 = active, 0 = deactive");
        });
    }

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