File: /var/www/html/orbidirectory.com/database/migrations/2024_06_13_095933_create_transporters_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('transporters', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('user_id');
$table->string('business_name');
$table->string('whatsapp_number');
$table->boolean('is_verified')->default(0)->comment('0:No, 1:Yes');
$table->enum('service_type', ['intercity', 'intracity', 'both'])->default('intracity');
$table->unsignedInteger('service_city');
$table->string('service_area')->nullable();
$table->tinyInteger('status')->default(1)->comment('0:Inactive, 1:Active, 2: Banned');
$table->text('inactive_reason')->nullable()->comment('Inactive or Banned Reason');
$table->string('address');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('transporters');
}
};