<?php

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

class Plot extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('plots', function (Blueprint $table) {

            $table->increments('id');
            $table->unsignedInteger('branch_id')->nullable();
            $table->integer('gid')->nullable();
            $table->integer('p_id')->nullable();
            $table->string('serial')->nullable();
            $table->string('status')->default('unsold');
            $table->string('floor')->nullable();
            $table->string('plot_id')->nullable();
            $table->string('block_name')->nullable();
            $table->string('size')->nullable();
            $table->string('dimensions')->nullable();
            $table->double('sarsai')->default(0);
            $table->string('category')->nullable();
            $table->string('type')->nullable();
            $table->string('feature_description',250)->nullable();
            $table->double('featurecharges')->nullable();
            $table->string('geom')->nullable();
            $table->double('rate')->default(0);
            $table->string('location',500)->nullable();
            $table->enum('parking_check', ['0','1'])->default('0');
            $table->integer('featurechrgesperc')->default(0);
            $table->enum('is_recycle', ['0','1','2'])->default('0');
            $table->timestamps();
            
        });
        
    }

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