<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateShopSendersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasTable('shop_senders')) {
            return;
        }
        Schema::create('shop_senders', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('shop_id');
            $table->integer('shop_ship_id');
            $table->string('country');
            $table->string('province');
            $table->string('city');
            $table->string('district');
            $table->string('detail');
            $table->string('name')->nullable()->default('');
            $table->string('mobile', 18)->nullable();
            $table->integer('sort')->default(1);
            $table->integer('status')->default(1);
            $table->string('wp_code')->default('');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_senders');
    }
}
