<?php

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

class SendSmsLog extends Migration
{
    const TABLE_SMS_LOG = 'table_sms_log';

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create(static::TABLE_SMS_LOG, function (Blueprint $table) {

            $table->increments('id');
            $table->string('phone_code');
            $table->string('phone_number');
            $table->string('code')->nullable();
            $table->boolean('is_sent')->nullable();
            $table->boolean('is_valid')->nullable();

            $table->string('aws_error_message')->nullable();

            $table->timestamps();
        });
    }

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