<?php

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

class CreateDiscountHostelsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('discount_hostels', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('hostel_id')->nullable();
            $table->integer('month')->nullable();
            $table->integer('year')->nullable();
            $table->integer('discount')->nullable();
            $table->integer('user_id')->nullable();
            $table->integer('owner_id')->nullable();
            $table->date('date')->nullable(); //kết hợp cả month và year
            $table->timestamps();
        });
    }

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