<?php

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

class CreateBixoMapBuildingsTable extends Migration
{
    /*
     * Run the migrations.
     *
     * @return void
     */

    public function up()
    {

        /*
         * Table: bixo_map_buildings
         */
        Schema::create('bixo_map_buildings', function ($table) {
            $table->increments('id');
            $table->integer('property_id')->nullable();
            $table->integer('area_id')->nullable();
            $table->integer('zone_id')->nullable();
            $table->string('area_name_ar', 100)->nullable();
            $table->string('area_name_en', 100)->nullable();
            $table->integer('land_number')->nullable();
            $table->integer('land_sub_number')->nullable();
            $table->integer('building_number')->nullable();
            $table->string('common_area', 50)->nullable();
            $table->integer('actual_common_area')->nullable();
            $table->integer('floors')->nullable();
            $table->integer('rooms')->nullable();
            $table->integer('rooms_ar')->nullable();
            $table->integer('rooms_en')->nullable();
            $table->integer('car_parks')->nullable();
            $table->integer('built_up_area')->nullable();
            $table->integer('bld_levels')->nullable();
            $table->integer('shops')->nullable();
            $table->integer('flats')->nullable();
            $table->integer('offices')->nullable();
            $table->integer('swimming')->nullable();
            $table->integer('elevators')->nullable();
            $table->integer('actual_area')->nullable();
            $table->integer('property_type_id')->nullable();
            $table->string('property_type_ar', 50)->nullable();
            $table->string('property_type_en', 50)->nullable();
            $table->integer('property_sub_type_id')->nullable();
            $table->string('property_sub_type_ar', 50)->nullable();
            $table->string('property_sub_type_en', 50)->nullable();
            $table->integer('parent_property_id')->nullable();
            $table->date('creation_date')->nullable();
            $table->integer('parcel_id')->nullable();
            $table->integer('is_free_hold')->nullable();
            $table->integer('is_lease_hold')->nullable();
            $table->integer('is_registered')->nullable();
            $table->integer('pre_registration_number')->nullable();
            $table->integer('master_project_id')->nullable();
            $table->string('master_project_en', 100)->nullable();
            $table->string('master_project_ar', 100)->nullable();
            $table->integer('project_id')->nullable();
            $table->string('project_name_ar', 100)->nullable();
            $table->string('project_name_en', 100)->nullable();
            $table->integer('land_type_id')->nullable();
            $table->string('land_type_ar', 50)->nullable();
            $table->string('land_type_en', 50)->nullable();
            $table->text('marking', 200)->nullable();
            $table->softDeletes();
            $table->nullableTimestamps();
        });
    }

    /*
    * Reverse the migrations.
    *
    * @return void
    */

    public function down()
    {
        Schema::drop('bixo_map_buildings');
    }
}