<?php

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

class CreateHotelTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('hotels', function (Blueprint $table) {
            $table->id();

            $table->unsignedBigInteger('city_id');
            $table->string('address', 200);
            $table->string('lat', 50)->nullable();
            $table->string('lng', 50)->nullable();
            $table->string('email', 100)->nullable();
            $table->longText('images');
            $table->text('room_type')->nullable()->comment('[1=>Individually,2=>couple,3=>tripartite,4=>quadrilateral]');
            $table->text('room_type_price');
            $table->longText('added_service')->nullable()->comment("[breakfast, half_residence, full_residence]");
            $table->longText('added_service_price');
            $table->boolean('include_breakfast')->default(0);
            $table->boolean('status')->default(1);

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

            $table->index(['city_id']);

            $table->engine = 'InnoDB';
        });
    }

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