added new column to company table and added the approval status constant file

This commit is contained in:
omair saleh
2020-11-30 21:44:52 +08:00
parent 8fdadf5209
commit 5d67c400e3
2 changed files with 26 additions and 1 deletions
@@ -0,0 +1,22 @@
<?php
namespace App\Classes\ValueObjects\Constants;
final class ApprovalStatus {
public const PENDING_VERIFICATION = 0;
public const ACTIVE = 1;
public const SUSPENDED = 2;
public const REJECTED = 3;
public const STATUS = [
0 => 'Pending Verification',
1 => 'Active',
2 => 'Suspended',
3 => 'Rejected'
];
}
@@ -1,8 +1,10 @@
<?php
use App\Classes\ValueObjects\Constants\BusinessType;
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
{
@@ -18,7 +20,8 @@ class CreateCompaniesTable extends Migration
$table->string('name');
$table->string('reference');
$table->integer('type');
$table->integer('business_type')->default(1);
$table->integer('business_type')->default(BusinessType::IMPORTER);
$table->integer('status')->default(ApprovalStatus::ACTIVE);
$table->timestamps();
$table->softDeletes();
});