<?php

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

class CreateStatisticsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('statistics', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('money_info_id')->nullable();
            $table->string('money_info_code')->nullable();
            $table->integer('collect_spend_id')->nullable();
            $table->string('collect_spend_code')->nullable();
            $table->integer('amount')->default(0);
            $table->integer('type')->nullable();
            $table->integer('type_collect_spend')->nullable();
            $table->integer('hostel_id')->nullable();
            $table->integer('room_id')->nullable();
            $table->integer('owner_id')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

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