<?php

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

class CreateSupportsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('supports', function (Blueprint $table) {
            $table->id();
            $table->integer('sender_id');
            $table->integer('assigned_id')->default(0);
            $table->string('title',255);
            $table->tinyInteger('priority')->default(1)->comment('1=normal,2=high, 3= Very High, 4=urgent');
            $table->tinyInteger('is_read')->default(0)->comment('1=normal,2=high, 3= Very High, 4=urgent');
            $table->tinyInteger('status')->default(0)->comment('0 = Pending, 1 = In progress, 2 = closed, 3 = replied');
            $table->timestamps();
        });
    }

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