Edit File: 2023_10_22_093117_create_delegates_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. * * @return void */ public function up() { Schema::create('delegates', function (Blueprint $table) { $table->id(); $table->string('name',50); $table->string('country_code',5)->default('966'); $table->string('phone'); $table->string('email')->nullable(); $table->string('image')->default('default.png'); $table->foreignId('city_id')->nullable()->constrained()->onDelete('cascade'); $table->double('avg_rate', 9, 2)->default(0); $table->boolean('active')->default(0); $table->boolean('is_blocked')->default(0); $table->boolean('is_approved')->default(0); $table->boolean('is_available_to_recieve_orders')->default(0); $table->string('car_plat_number')->nullable(); $table->json('car_images')->nullable(); $table->json('identity_images')->nullable(); $table->json('licencses_certificate')->nullable(); $table->string('lang', 2)->default('ar'); $table->boolean('is_notify')->default(true); $table->string('code', 10)->nullable(); $table->timestamp('code_expire')->nullable(); $table->decimal('lat')->nullable(); $table->decimal('lng')->nullable(); $table->string('map_desc')->nullable(); $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('delegates'); } };
Back to File Manager