<?php

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

class CreateUmrahTripReservationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('umrah_trip_reservations', function (Blueprint $table) {
            $table->id();
            $table->string('name', 200)->nullable();
            $table->string('email', 100);
            $table->string('phone', 14);
//            $table->enum('trip_type', ['u', 'ut', 'uta'])->comment('[u=>umrah, ua=>umrah+transfer, uta=>umrah+transfer+accommodation]');
            $table->date('umrah_trip_date');
            $table->unsignedBigInteger('user_id')->nullable();
            $table->unsignedBigInteger('umrah_trip_id');

            $table->unsignedBigInteger('departure_city');
            $table->unsignedBigInteger('arrival_city');
            $table->integer('person_count');
            $table->double('total');
            $table->double('price_per_person')->nullable()->comment('Price per person according to the type of umrah_trip');
            $table->json('rally_point_info')->nullable();
            $table->enum('house_type', ['private', 'group'])->nullable();




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

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

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