<?php

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

class CreateSmsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('sms', function (Blueprint $table) {
            $table->increments('id');

            $table->integer('user_id')->nullable();
            $table->integer('installment_id')->nullable();
            $table->integer('booking_id')->nullable();
            $table->string('number')->nullable();
            $table->string('message')->nullable();
            $table->double('amount')->nullable();
            $table->enum('status', ['0','1'])->default('0');
            $table->enum('sms_type', ['Booking', 'Installment','Birthday'])->nullable();
            $table->enum('is_recycle', ['0','1','2'])->default('0');
            $table->timestamps();
        });
    }

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