<?php

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

class CreateUserAccountRulesTable extends Migration
{

    /**
     * Run the migrations.
     * @return void
     */
    public function up()
    {
        Schema::create('user_account_rules', function (Blueprint $table) {
            $table->id();
            $table->string('title', 50);
            $table->string('name', 50);
            $table->string('type', 50);
            $table->decimal('variable')->default(0);
            $table->integer('trigger')->default(0);
            $table->boolean('deductions');
            $table->string('remark', 200);
            $table->timestamps();
            $table->softDeletes();
        });
    }

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

}
