<?php

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

class CreateTasksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tasks', function (Blueprint $table) {
            $table->increments('id');
            $table->bigInteger('user_id')->nullable();
            $table->bigInteger('assign_to_id')->nullable();
            $table->bigInteger('lead_id')->nullable();
            $table->bigInteger('visit_id')->nullable();
            $table->string('added_by')->nullable();
            $table->string('title')->nullable();
            $table->string('description')->nullable();
            $table->string('status')->default('Assigned');
            $table->timestamp('date')->nullable();


            $table->timestamps();
        });
    }

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