<?php

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

class CreateHostelPostCrawlVipsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('hostel_post_crawl_vips', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('hostel_id')->nullable();
            $table->integer('user_id')->nullable();
            $table->boolean('is_active')->default(true);
            $table->dateTime('started_at')->nullable();
            $table->dateTime('ended_at')->nullable();
            $table->longText('request_log')->nullable();
            $table->longText('response_log')->nullable();
            $table->string('wallet_trans_id')->nullable();
            $table->integer('amount')->default(0);
            $table->integer('number_days')->default(0);
            $table->text('desc')->nullable();
            $table->timestamps();
        });
    }

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