<?php

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

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

    public function up()
    {

        /*
         * Table: bixo_map_transactions
         */
        Schema::create('bixo_map_transactions', function ($table) {
            $table->increments('id');
            $table->string('transaction_id', 16)->nullable();
            $table->integer('procedure_id')->nullable();
            $table->integer('trans_group_id')->nullable();
            $table->string('trans_group_ar', 7)->nullable();
            $table->string('trans_group_en', 5)->nullable();
            $table->string('procedure_name_ar', 26)->nullable();
            $table->string('procedure_name_en', 25)->nullable();
            $table->integer('instance_date')->nullable();
            $table->integer('property_type_id')->nullable();
            $table->string('property_type_ar', 4)->nullable();
            $table->string('property_type_en', 5)->nullable();
            $table->string('property_sub_type_id', 4)->nullable();
            $table->string('property_sub_type_ar', 9)->nullable();
            $table->string('property_sub_type_en', 4)->nullable();
            $table->string('property_usage_ar', 5)->nullable();
            $table->string('property_usage_en', 11)->nullable();
            $table->integer('reg_type_id')->nullable();
            $table->string('reg_type_ar', 16)->nullable();
            $table->string('reg_type_en', 19)->nullable();
            $table->integer('area_id')->nullable();
            $table->string('area_name_ar', 14)->nullable();
            $table->string('area_name_en', 16)->nullable();
            $table->string('building_name_ar', 14)->nullable();
            $table->string('building_name_en', 14)->nullable();
            $table->string('project_number', 4)->nullable();
            $table->string('project_name_ar', 15)->nullable();
            $table->string('project_name_en', 19)->nullable();
            $table->string('master_project_en', 26)->nullable();
            $table->string('master_project_ar', 33)->nullable();
            $table->string('nearest_landmark_ar', 15)->nullable();
            $table->string('nearest_landmark_en', 27)->nullable();
            $table->string('nearest_metro_ar', 27)->nullable();
            $table->string('nearest_metro_en', 36)->nullable();
            $table->string('nearest_mall_ar', 14)->nullable();
            $table->string('nearest_mall_en', 18)->nullable();
            $table->string('rooms_ar', 7)->nullable();
            $table->string('rooms_en', 6)->nullable();
            $table->integer('has_parking')->nullable();
            $table->decimal('procedure_area', 5,2)->nullable();
            $table->integer('actual_worth')->nullable();
            $table->decimal('meter_sale_price', 7,2)->nullable();
            $table->string('rent_value', 4)->nullable();
            $table->string('meter_rent_price', 4)->nullable();
            $table->integer('no_of_parties_role_1')->nullable();
            $table->integer('no_of_parties_role_2')->nullable();
            $table->integer('no_of_parties_role_3')->nullable();
            $table->text('marking', 200)->nullable();
            $table->softDeletes();
            $table->nullableTimestamps();
        });
    }

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

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