<?php

use App\Classes\ValueObjects\Constants\AccountStatus;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateCompaniesTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('companies', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('reference_no')->unique();
            $table->string('name');
            $table->integer('type')->comment('business type eg. personal, company');
            $table->integer('status')->default(AccountStatus::PENDING_VERIFICATION);
            $table->timestamps();
            $table->softDeletes();
        });
    }

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