You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.5 KiB
49 lines
1.5 KiB
1 year ago
|
<?php
|
||
|
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
use Illuminate\Support\Facades\Schema;
|
||
|
|
||
|
class CreateRestaurantsTable extends Migration
|
||
|
{
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
Schema::create('restaurants', function (Blueprint $table) {
|
||
|
$table->id();
|
||
|
$table->string('name');
|
||
|
$table->string('phone',20)->unique();
|
||
|
$table->string('email',100)->nullable();
|
||
|
$table->string('logo')->nullable();
|
||
|
$table->string('latitude')->nullable();
|
||
|
$table->string('longitude')->nullable();
|
||
|
$table->text('address')->nullable();
|
||
|
$table->text('footer_text')->nullable();
|
||
|
$table->decimal('minimum_order', $precision = 6, $scale = 2)->default(0);
|
||
|
$table->decimal('delivery_charge', $precision = 6, $scale = 2)->default(0);
|
||
|
$table->decimal('comission', $precision = 6, $scale = 2)->default(0);
|
||
|
$table->string('currency',100)->default('BDT');
|
||
|
$table->time('opening_time')->nullable();
|
||
|
$table->time('closeing_time')->nullable();
|
||
|
$table->boolean('cash_on_delivery')->default(0);
|
||
|
$table->boolean('status')->default(1);
|
||
|
$table->foreignId('vendor_id');
|
||
|
$table->timestamps();
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::dropIfExists('restaurants');
|
||
|
}
|
||
|
}
|