Edit File: 2021_06_26_092337_create_stores_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateStoresTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('stores', function (Blueprint $table) { $table->id(); $table->foreignId('store_id')->nullable()->constrained()->onDelete('cascade')->onUpdate('cascade'); $table->string('name'); $table->string('icon'); $table->string('cover'); $table->string('lat')->nullable(); $table->string('long')->nullable(); $table->text('address')->nullable(); $table->integer('num_rating')->default(0); $table->string('rate')->default('0.00'); $table->string('citc_authority_id')->nullable(); $table->string('category'); $table->softDeletes(); $table->enum('offer',['true','false'])->default('false'); $table->string('offer_image')->nullable(); $table->double('offer_amount')->default(0); $table->enum('offer_type',['percentage','static_price'])->default('percentage'); $table->double('offer_max')->default(0); $table->enum('available',['true','false'])->default('true'); $table->enum('join_request',['true','false'])->default('false'); $table->enum('seen',['true','false'])->default('false'); $table->enum('status',['accepted','rejected','pending'])->default('pending'); $table->enum('special',['true','false'])->default('true'); $table->enum('has_contract',['true','false'])->default('false'); $table->foreignId('user_id')->nullable()->constrained()->onDelete('cascade'); $table->string('iban_image')->nullable(); $table->double('app_commission')->default(0); $table->enum('commission_type',['percentage','static_price'])->default('percentage'); $table->text('refuse_reason')->nullable(); $table->string('commercial_id')->nullable(); $table->string('commercial_image')->nullable(); $table->string('bank_name')->nullable(); $table->string('bank_owner_name')->nullable(); $table->text('iban_number')->nullable(); $table->text('bank_number')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('stores'); } }
Back to File Manager