mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-19 04:24:16 +00:00
41 lines
1.1 KiB
PHP
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');
|
|
}
|
|
}
|