<?php

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

class CreateVisitorEntriesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('visitor_entries', function (Blueprint $table) {
            $table->id();
            $table->integer("admin_id");
            $table->string('visitor_name');
            $table->string('information_number');
            $table->string('gender');
            $table->string('id_type');
            $table->string('id_number');
            $table->string('orgnization');
            $table->string('designation');
            $table->string('visitor_mobile');
            $table->longText('address');
            $table->string('city');
            $table->string('state');
            $table->string('pincode');
            $table->string('country');
            $table->string("profile_pic")->nullable();
            $table->string("pre_approved_pass")->nullable();
            $table->string("vehicle_type")->nullable();
            $table->string("vehicle_number")->nullable();
            $table->string("visitor_category_id")->nullable();
            $table->integer("number_of_visitor")->nullable();
            $table->longText("purpose_of_visit")->nullable();
            $table->integer("visiting_limit")->nullable();
            $table->string("location_information")->nullable();
            $table->string("pass_number")->nullable();
            $table->string("contact_no")->nullable();
            $table->dateTime("check_in_time")->nullable();
            $table->dateTime("check_out_time")->nullable();
            $table->string("gate")->nullable();
            $table->string("fever")->nullable()->default('no');
            $table->string("sore_throat")->nullable()->default('no');
            $table->string("dry_cough")->nullable()->default('no');
            $table->string("running_nose")->nullable()->default('no');
            $table->string("covid_vaccination")->nullable()->default('no');

            $table->integer("host_id")->nullable();
            $table->string("host_department")->nullable();
            $table->string("delivery_order")->nullable();
            $table->string("min")->nullable();
            $table->date("visit_date")->nullable();
            $table->longText("remarks")->nullable();
    
            $table->timestamps();
        });
    }

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