Files
exchange-2.0/database/migrations/2020_10_22_071102_create_companies_table.php
T
omair saleh 05401f6bbc large commit
2021-03-11 13:06:40 +08:00

41 lines
1.1 KiB
PHP

<?php
use App\Classes\ValueObjects\Constants\BusinessType;
use App\Classes\ValueObjects\Constants\CompanyType;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
class CreateCompaniesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('companies', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('reference');
$table->integer('type')->default(CompanyType::COMPANY_BUSINESS);
$table->integer('business_type')->default(BusinessType::IMPORTER);
$table->integer('status')->default(ApprovalStatus::PENDING_SUBMISSION);
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('companies');
}
}