<?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('firstname')->nullable();

            $table->string('username');

            $table->string('email')->unique();
            $table->timestamp('email_verified_at')->nullable();
            $table->string('phone')->nullable();
           
            $table->string('country_code')->nullable();
            $table->text('address')->nullable();
            $table->string('photo')->nullable();
            $table->boolean('active')->default(false);

            $table->string('activationcode')->nullable();
            $table->timestamp('lastlogin')->nullable();
            $table->string('push_token')->nullable();
            $table->string('platform')->nullable();
            $table->string('app_version')->nullable();
            $table->integer('points_cumules')->default(0);

            $table->string('password');
            $table->rememberToken();
            $table->timestamps();
        });
    }

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